Class AttributedString
Basic class to work with attributed strings.
Attributed strings are strings that can have multiple attributes per character of the string
- apemsel\AttributedString\AttributedString implements Countable
Direct known subclasses
apemsel\AttributedString\MutableAttributedString,
apemsel\AttributedString\TokenizedAttributedString
Namespace: apemsel\AttributedString
Author: Adrian Pemsel apemsel@gmail.com
Located at AttributedString.php
Author: Adrian Pemsel apemsel@gmail.com
Located at AttributedString.php
Methods summary
public
|
|
public
string
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
integer
|
#
setPattern( string $pattern, string $attribute, boolean $state = true )
Set parts of the string matching a given regex to an attribute and state |
public
|
#
setSubstring( string $substring, string $attribute, boolean $all = true, boolean $matchCase = true, boolean $state = true )
Set given substring to an attribute and state |
public
integer|int[]
|
#
searchAttribute( string $attribute, integer $offset = 0, boolean $returnLength = false, boolean $state = true, boolean $strict = true )
Search inside the string for ranges with the given attribute |
public
boolean
|
|
public
string[]
|
|
public
string
|
|
public
|
#
combineAttributes( string $op, string $attribute1, string $attribute2 = false, string $to = false )
Combine attributes with the given boolean operation |
public
|
|
protected
|
|
protected
|
|
protected static
|
|
protected static
|
|
public
integer
|
Properties summary
protected
|
$string
|
|
protected
|
$attributes
|
|
protected
|
$length
|
|
protected
|
$byteToChar
|