---
name: "String::Tagged::Extent"
section: "3pm"
platform: "linux"
package: "libstring-tagged-perl"
version: "0.24-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/String::Tagged::Extent"
---

# String::Tagged::Extent(3pm)

represents a range within a "String::Tagged"

## NAME

"String::Tagged::Extent" - represents a range within a "String::Tagged"

## DESCRIPTION

These objects represent a range of characters within the containing String::Tagged object. The range they represent is fixed at the time of creation. If the containing string is modified by a call to `"set_substr"` then the effect on the extent object is not defined. These objects should be considered as relatively short-lived - used briefly for the purpose of querying the result of an operation, then discarded soon after.

## METHODS

### string

```
   $extent->string;
```

Returns the containing String::Tagged object.

### start

```
   $extent->start;
```

Returns the start index of the extent. This is the index of the first character within the extent.

### end

```
   $extent->end;
```

Returns the end index of the extent. This is the index of the first character beyond the end of the extent.

### anchor\_before

```
   $extent->anchor_before;
```

True if this extent begins "before" the start of the string. Only certain methods return extents with this flag defined.

### anchor\_after

```
   $extent->anchor_after;
```

True if this extent ends "after" the end of the string. Only certain methods return extents with this flag defined.

### length

```
   $extent->length;
```

Returns the number of characters within the extent.

### substr

```
   $extent->substr;
```

Returns the substring contained by the extent, as a String::Tagged complete with all the relevant tag values.

### plain\_substr

```
   $extent->plain_substr;
```

Returns the substring of the underlying plain string buffer contained by the extent, as a plain Perl string.

## AUTHOR

Paul Evans \<leonerd@leonerd.org.uk\>
