class TextIteratorElement (View source)

A UTF8-aware TextIterator

Methods

__construct(string $value, int $offset, int $length = 0, bool $boundary = false)

Constructor

string
getValue()

Returns the element's value

int
getOffset()

Returns the element's offset

int
getLength()

Returns the element's length

bool
isBoundary()

Returns true for a boundary element

Details

__construct(string $value, int $offset, int $length = 0, bool $boundary = false)

Constructor

Parameters

string $value

The value of the element

int $offset

The offset in the original string

int $length
bool $boundary

string getValue()

Returns the element's value

Return Value

string

The element's value

int getOffset()

Returns the element's offset

Return Value

int

The element's offset

int getLength()

Returns the element's length

Return Value

int

The element's length

bool isBoundary()

Returns true for a boundary element

Return Value

bool

true for boundary elements