CodePointString
        
        extends AbstractUnicodeString
    
    
            
            in package
            
        
    
    
    
Represents a string of Unicode code points encoded as UTF-8.
Tags
Table of Contents
Constants
- NFC = \Normalizer::NFC
 - NFD = \Normalizer::NFD
 - NFKC = \Normalizer::NFKC
 - NFKD = \Normalizer::NFKD
 - PREG_OFFSET_CAPTURE = \PREG_OFFSET_CAPTURE
 - PREG_PATTERN_ORDER = \PREG_PATTERN_ORDER
 - PREG_SET_ORDER = \PREG_SET_ORDER
 - PREG_SPLIT = 0
 - PREG_SPLIT_DELIM_CAPTURE = \PREG_SPLIT_DELIM_CAPTURE
 - PREG_SPLIT_NO_EMPTY = \PREG_SPLIT_NO_EMPTY
 - PREG_SPLIT_OFFSET_CAPTURE = \PREG_SPLIT_OFFSET_CAPTURE
 - PREG_UNMATCHED_AS_NULL = \PREG_UNMATCHED_AS_NULL
 
Properties
- $ignoreCase : bool|null
 - $string : string
 
Methods
- __clone() : mixed
 - __construct() : mixed
 - __sleep() : array<string|int, mixed>
 - __toString() : string
 - after() : static
 - afterLast() : static
 - append() : static
 - ascii() : self
 - Generic UTF-8 to ASCII transliteration.
 - before() : static
 - beforeLast() : static
 - bytesAt() : array<string|int, int>
 - camel() : static
 - chunk() : array<string|int, static>
 - codePointsAt() : array<string|int, int>
 - collapseWhitespace() : static
 - containsAny() : bool
 - endsWith() : bool
 - ensureEnd() : static
 - ensureStart() : static
 - equalsTo() : bool
 - folded() : static
 - fromCodePoints() : static
 - ignoreCase() : static
 - indexOf() : int|null
 - indexOfLast() : int|null
 - isEmpty() : bool
 - join() : static
 - jsonSerialize() : string
 - kebab() : static
 - length() : int
 - localeLower() : static
 - localeTitle() : static
 - localeUpper() : static
 - lower() : static
 - match() : array<string|int, mixed>
 - Matches the string using a regular expression.
 - normalize() : static
 - padBoth() : static
 - padEnd() : static
 - padStart() : static
 - prepend() : static
 - repeat() : static
 - replace() : static
 - replaceMatches() : static
 - reverse() : static
 - slice() : static
 - snake() : static
 - splice() : static
 - split() : array<string|int, static>
 - startsWith() : bool
 - title() : static
 - toByteString() : ByteString
 - toCodePointString() : CodePointString
 - toString() : string
 - toUnicodeString() : UnicodeString
 - trim() : static
 - trimEnd() : static
 - trimPrefix() : static
 - trimStart() : static
 - trimSuffix() : static
 - truncate() : static
 - unwrap() : array<string|int, string>|array<string|int, mixed>
 - Unwraps instances of AbstractString back to strings.
 - upper() : static
 - width() : int
 - Returns the printable length on a terminal.
 - wordwrap() : static
 - wrap() : array<string|int, static>|array<string|int, mixed>
 - Wraps (and normalizes) strings in instances of AbstractString.
 
Constants
NFC
    public
        mixed
    NFC
    = \Normalizer::NFC
    
    
    
    
NFD
    public
        mixed
    NFD
    = \Normalizer::NFD
    
    
    
    
NFKC
    public
        mixed
    NFKC
    = \Normalizer::NFKC
    
    
    
    
NFKD
    public
        mixed
    NFKD
    = \Normalizer::NFKD
    
    
    
    
PREG_OFFSET_CAPTURE
    public
        mixed
    PREG_OFFSET_CAPTURE
    = \PREG_OFFSET_CAPTURE
    
    
    
    
PREG_PATTERN_ORDER
    public
        mixed
    PREG_PATTERN_ORDER
    = \PREG_PATTERN_ORDER
    
    
    
    
PREG_SET_ORDER
    public
        mixed
    PREG_SET_ORDER
    = \PREG_SET_ORDER
    
    
    
    
PREG_SPLIT
    public
        mixed
    PREG_SPLIT
    = 0
    
    
    
    
PREG_SPLIT_DELIM_CAPTURE
    public
        mixed
    PREG_SPLIT_DELIM_CAPTURE
    = \PREG_SPLIT_DELIM_CAPTURE
    
    
    
    
PREG_SPLIT_NO_EMPTY
    public
        mixed
    PREG_SPLIT_NO_EMPTY
    = \PREG_SPLIT_NO_EMPTY
    
    
    
    
PREG_SPLIT_OFFSET_CAPTURE
    public
        mixed
    PREG_SPLIT_OFFSET_CAPTURE
    = \PREG_SPLIT_OFFSET_CAPTURE
    
    
    
    
PREG_UNMATCHED_AS_NULL
    public
        mixed
    PREG_UNMATCHED_AS_NULL
    = \PREG_UNMATCHED_AS_NULL
    
    
    
    
Properties
$ignoreCase
    protected
        bool|null
    $ignoreCase
     = false
    
    
    
    
$string
    protected
        string
    $string
     = ''
    
    
    
    
Methods
__clone()
    public
                    __clone() : mixed
    __construct()
    public
                    __construct([string $string = '' ]) : mixed
    Parameters
- $string : string = ''
 
__sleep()
    public
                    __sleep() : array<string|int, mixed>
    Return values
array<string|int, mixed>__toString()
    public
                    __toString() : string
    Return values
stringafter()
    public
                    after(string|array<string|int, string> $needle[, bool $includeNeedle = false ][, int $offset = 0 ]) : static
    Parameters
- $needle : string|array<string|int, string>
 - $includeNeedle : bool = false
 - $offset : int = 0
 
Return values
staticafterLast()
    public
                    afterLast(string|array<string|int, string> $needle[, bool $includeNeedle = false ][, int $offset = 0 ]) : static
    Parameters
- $needle : string|array<string|int, string>
 - $includeNeedle : bool = false
 - $offset : int = 0
 
Return values
staticappend()
    public
                    append(string ...$suffix) : static
    Parameters
- $suffix : string
 
Return values
staticascii()
Generic UTF-8 to ASCII transliteration.
    public
                    ascii([array<string|int, string>|array<string|int, Transliterator>|array<string|int, Closure> $rules = [] ]) : self
    Install the intl extension for best results.
Parameters
- $rules : array<string|int, string>|array<string|int, Transliterator>|array<string|int, Closure> = []
 - 
                    
See "*-Latin" rules from Transliterator::listIDs()
 
Return values
selfbefore()
    public
                    before(string|array<string|int, string> $needle[, bool $includeNeedle = false ][, int $offset = 0 ]) : static
    Parameters
- $needle : string|array<string|int, string>
 - $includeNeedle : bool = false
 - $offset : int = 0
 
Return values
staticbeforeLast()
    public
                    beforeLast(string|array<string|int, string> $needle[, bool $includeNeedle = false ][, int $offset = 0 ]) : static
    Parameters
- $needle : string|array<string|int, string>
 - $includeNeedle : bool = false
 - $offset : int = 0
 
Return values
staticbytesAt()
    public
                    bytesAt(int $offset) : array<string|int, int>
    Parameters
- $offset : int
 
Return values
array<string|int, int>camel()
    public
                    camel() : static
    Return values
staticchunk()
    public
                    chunk([int $length = 1 ]) : array<string|int, static>
    Parameters
- $length : int = 1
 
Return values
array<string|int, static>codePointsAt()
    public
                    codePointsAt(int $offset) : array<string|int, int>
    Parameters
- $offset : int
 
Return values
array<string|int, int>collapseWhitespace()
    public
                    collapseWhitespace() : static
    Return values
staticcontainsAny()
    public
                    containsAny(string|array<string|int, string> $needle) : bool
    Parameters
- $needle : string|array<string|int, string>
 
Return values
boolendsWith()
    public
                    endsWith(string|iterable<string|int, mixed>|AbstractString $suffix) : bool
    Parameters
- $suffix : string|iterable<string|int, mixed>|AbstractString
 
Return values
boolensureEnd()
    public
                    ensureEnd(string $suffix) : static
    Parameters
- $suffix : string
 
Return values
staticensureStart()
    public
                    ensureStart(string $prefix) : static
    Parameters
- $prefix : string
 
Return values
staticequalsTo()
    public
                    equalsTo(string|iterable<string|int, mixed>|AbstractString $string) : bool
    Parameters
- $string : string|iterable<string|int, mixed>|AbstractString
 
Return values
boolfolded()
    public
                    folded([bool $compat = true ]) : static
    Parameters
- $compat : bool = true
 
Return values
staticfromCodePoints()
    public
            static        fromCodePoints(int ...$codes) : static
    Parameters
- $codes : int
 
Return values
staticignoreCase()
    public
                    ignoreCase() : static
    Return values
staticindexOf()
    public
                    indexOf(string|iterable<string|int, mixed>|AbstractString $needle[, int $offset = 0 ]) : int|null
    Parameters
- $needle : string|iterable<string|int, mixed>|AbstractString
 - $offset : int = 0
 
Return values
int|nullindexOfLast()
    public
                    indexOfLast(string|iterable<string|int, mixed>|AbstractString $needle[, int $offset = 0 ]) : int|null
    Parameters
- $needle : string|iterable<string|int, mixed>|AbstractString
 - $offset : int = 0
 
Return values
int|nullisEmpty()
    public
                    isEmpty() : bool
    Return values
booljoin()
    public
                    join(array<string|int, mixed> $strings[, string|null $lastGlue = null ]) : static
    Parameters
- $strings : array<string|int, mixed>
 - $lastGlue : string|null = null
 
Return values
staticjsonSerialize()
    public
                    jsonSerialize() : string
    Return values
stringkebab()
    public
                    kebab() : static
    Return values
staticlength()
    public
                    length() : int
    Return values
intlocaleLower()
    public
                    localeLower(string $locale) : static
    Parameters
- $locale : string
 - 
                    
In the format language_region (e.g. tr_TR)
 
Return values
staticlocaleTitle()
    public
                    localeTitle(string $locale) : static
    Parameters
- $locale : string
 - 
                    
In the format language_region (e.g. tr_TR)
 
Return values
staticlocaleUpper()
    public
                    localeUpper(string $locale) : static
    Parameters
- $locale : string
 - 
                    
In the format language_region (e.g. tr_TR)
 
Return values
staticlower()
    public
                    lower() : static
    Return values
staticmatch()
Matches the string using a regular expression.
    public
                    match(string $regexp[, int $flags = 0 ][, int $offset = 0 ]) : array<string|int, mixed>
    Pass PREG_PATTERN_ORDER or PREG_SET_ORDER as $flags to get all occurrences matching the regular expression.
Parameters
- $regexp : string
 - $flags : int = 0
 - $offset : int = 0
 
Return values
array<string|int, mixed> —All matches in a multi-dimensional array ordered according to flags
normalize()
    public
                    normalize([int $form = self::NFC ]) : static
    Parameters
- $form : int = self::NFC
 
Return values
staticpadBoth()
    public
                    padBoth(int $length[, string $padStr = ' ' ]) : static
    Parameters
- $length : int
 - $padStr : string = ' '
 
Return values
staticpadEnd()
    public
                    padEnd(int $length[, string $padStr = ' ' ]) : static
    Parameters
- $length : int
 - $padStr : string = ' '
 
Return values
staticpadStart()
    public
                    padStart(int $length[, string $padStr = ' ' ]) : static
    Parameters
- $length : int
 - $padStr : string = ' '
 
Return values
staticprepend()
    public
                    prepend(string ...$prefix) : static
    Parameters
- $prefix : string
 
Return values
staticrepeat()
    public
                    repeat(int $multiplier) : static
    Parameters
- $multiplier : int
 
Return values
staticreplace()
    public
                    replace(string $from, string $to) : static
    Parameters
- $from : string
 - $to : string
 
Return values
staticreplaceMatches()
    public
                    replaceMatches(string $fromRegexp, string|callable $to) : static
    Parameters
- $fromRegexp : string
 - $to : string|callable
 
Return values
staticreverse()
    public
                    reverse() : static
    Return values
staticslice()
    public
                    slice([int $start = 0 ][, int|null $length = null ]) : static
    Parameters
- $start : int = 0
 - $length : int|null = null
 
Return values
staticsnake()
    public
                    snake() : static
    Return values
staticsplice()
    public
                    splice(string $replacement[, int $start = 0 ][, int|null $length = null ]) : static
    Parameters
- $replacement : string
 - $start : int = 0
 - $length : int|null = null
 
Return values
staticsplit()
    public
                    split(string $delimiter[, int|null $limit = null ][, int|null $flags = null ]) : array<string|int, static>
    Parameters
- $delimiter : string
 - $limit : int|null = null
 - $flags : int|null = null
 
Return values
array<string|int, static>startsWith()
    public
                    startsWith(string|iterable<string|int, mixed>|AbstractString $prefix) : bool
    Parameters
- $prefix : string|iterable<string|int, mixed>|AbstractString
 
Return values
booltitle()
    public
                    title([bool $allWords = false ]) : static
    Parameters
- $allWords : bool = false
 
Return values
statictoByteString()
    public
                    toByteString([string|null $toEncoding = null ]) : ByteString
    Parameters
- $toEncoding : string|null = null
 
Return values
ByteStringtoCodePointString()
    public
                    toCodePointString() : CodePointString
    Return values
CodePointStringtoString()
    public
                    toString() : string
    Return values
stringtoUnicodeString()
    public
                    toUnicodeString() : UnicodeString
    Return values
UnicodeStringtrim()
    public
                    trim([string $chars = " 	
  " ]) : static
    Parameters
- $chars : string = " "
 
Return values
statictrimEnd()
    public
                    trimEnd([string $chars = " 	
  " ]) : static
    Parameters
- $chars : string = " "
 
Return values
statictrimPrefix()
    public
                    trimPrefix(mixed $prefix) : static
    Parameters
- $prefix : mixed
 
Return values
statictrimStart()
    public
                    trimStart([string $chars = " 	
  " ]) : static
    Parameters
- $chars : string = " "
 
Return values
statictrimSuffix()
    public
                    trimSuffix(mixed $suffix) : static
    Parameters
- $suffix : mixed
 
Return values
statictruncate()
    public
                    truncate(int $length[, string $ellipsis = '' ][, bool|TruncateMode $cut = TruncateMode::Char ]) : static
    Parameters
- $length : int
 - $ellipsis : string = ''
 - $cut : bool|TruncateMode = TruncateMode::Char
 
Return values
staticunwrap()
Unwraps instances of AbstractString back to strings.
    public
            static        unwrap(array<string|int, mixed> $values) : array<string|int, string>|array<string|int, mixed>
    Parameters
- $values : array<string|int, mixed>
 
Return values
array<string|int, string>|array<string|int, mixed>upper()
    public
                    upper() : static
    Return values
staticwidth()
Returns the printable length on a terminal.
    public
                    width([bool $ignoreAnsiDecoration = true ]) : int
    Parameters
- $ignoreAnsiDecoration : bool = true
 
Return values
intwordwrap()
    public
                    wordwrap([int $width = 75 ][, string $break = "
" ][, bool $cut = false ]) : static
    Parameters
- $width : int = 75
 - $break : string = " "
 - $cut : bool = false
 
Return values
staticwrap()
Wraps (and normalizes) strings in instances of AbstractString.
    public
            static        wrap(array<string|int, mixed> $values) : array<string|int, static>|array<string|int, mixed>
    Parameters
- $values : array<string|int, mixed>