Copied!

Represents a string of abstract Unicode characters.

Unicode defines 3 types of "characters" (bytes, code points and grapheme clusters).
This class is the abstract type to use as a type-hint when the logic you want to
implement is Unicode-aware but doesn't care about code points vs grapheme clusters.

Abstract
Constants
public Symfony\Component\String\AbstractUnicodeString::NFC = 16
public Symfony\Component\String\AbstractUnicodeString::NFD = 4
public Symfony\Component\String\AbstractUnicodeString::NFKC = 32
public Symfony\Component\String\AbstractUnicodeString::NFKD = 8
public Symfony\Component\String\AbstractString::PREG_OFFSET_CAPTURE = 256
public Symfony\Component\String\AbstractString::PREG_PATTERN_ORDER = 1
public Symfony\Component\String\AbstractString::PREG_SET_ORDER = 2
public Symfony\Component\String\AbstractString::PREG_SPLIT = 0
public Symfony\Component\String\AbstractString::PREG_SPLIT_DELIM_CAPTURE = 2
public Symfony\Component\String\AbstractString::PREG_SPLIT_NO_EMPTY = 1
public Symfony\Component\String\AbstractString::PREG_SPLIT_OFFSET_CAPTURE = 4
public Symfony\Component\String\AbstractString::PREG_UNMATCHED_AS_NULL = 512
Methods
public Symfony\Component\String\AbstractString::__clone()
public abstract Symfony\Component\String\AbstractString::__construct(string $string = '')
public Symfony\Component\String\AbstractString::__sleep() : array
public Symfony\Component\String\AbstractString::__toString() : string
public Symfony\Component\String\AbstractString::after(Traversable|array|string $needle, bool $includeNeedle = false, int $offset = 0) : static
public Symfony\Component\String\AbstractString::afterLast(Traversable|array|string $needle, bool $includeNeedle = false, int $offset = 0) : static
public abstract Symfony\Component\String\AbstractString::append(string $suffix) : static
public ascii(array $rules = []) : self
 

Generic UTF-8 to ASCII transliteration.

Install the intl extension for best results.

public Symfony\Component\String\AbstractString::before(Traversable|array|string $needle, bool $includeNeedle = false, int $offset = 0) : static
public Symfony\Component\String\AbstractString::beforeLast(Traversable|array|string $needle, bool $includeNeedle = false, int $offset = 0) : static
public Symfony\Component\String\AbstractString::bytesAt(int $offset) : array
public camel() : static
public abstract Symfony\Component\String\AbstractString::chunk(int $length = 1) : array
public codePointsAt(int $offset) : array
public Symfony\Component\String\AbstractString::collapseWhitespace() : static
public Symfony\Component\String\AbstractString::containsAny(Traversable|array|string $needle) : bool
public Symfony\Component\String\AbstractString::endsWith(Traversable|array|string $suffix) : bool
public Symfony\Component\String\AbstractString::ensureEnd(string $suffix) : static
public Symfony\Component\String\AbstractString::ensureStart(string $prefix) : static
public Symfony\Component\String\AbstractString::equalsTo(Traversable|array|string $string) : bool
public folded(bool $compat = true) : static
public static fromCodePoints(int $codes) : static
public Symfony\Component\String\AbstractString::ignoreCase() : static
public Symfony\Component\String\AbstractString::indexOf(Traversable|array|string $needle, int $offset = 0) : ?int
public Symfony\Component\String\AbstractString::indexOfLast(Traversable|array|string $needle, int $offset = 0) : ?int
public Symfony\Component\String\AbstractString::isEmpty() : bool
public join(array $strings, ?string $lastGlue = NULL) : static
public Symfony\Component\String\AbstractString::jsonSerialize() : string
public abstract Symfony\Component\String\AbstractString::length() : int
public lower() : static
public match(string $regexp, int $flags = 0, int $offset = 0) : array
public normalize(int $form = 16self::NFC) : static
public padBoth(int $length, string $padStr = ' ') : static
public padEnd(int $length, string $padStr = ' ') : static
public padStart(int $length, string $padStr = ' ') : static
public abstract Symfony\Component\String\AbstractString::prepend(string $prefix) : static
public Symfony\Component\String\AbstractString::repeat(int $multiplier) : static
public abstract Symfony\Component\String\AbstractString::replace(string $from, string $to) : static
public replaceMatches(string $fromRegexp, callable|string $to) : static
public reverse() : static
public abstract Symfony\Component\String\AbstractString::slice(int $start = 0, ?int $length = NULL) : static
public snake() : static
public abstract Symfony\Component\String\AbstractString::splice(string $replacement, int $start = 0, ?int $length = NULL) : static
public Symfony\Component\String\AbstractString::split(string $delimiter, ?int $limit = NULL, ?int $flags = NULL) : array
public Symfony\Component\String\AbstractString::startsWith(Traversable|array|string $prefix) : bool
public title(bool $allWords = false) : static
public Symfony\Component\String\AbstractString::toByteString(?string $toEncoding = NULL) : Symfony\Component\String\ByteString
public Symfony\Component\String\AbstractString::toCodePointString() : Symfony\Component\String\CodePointString
public Symfony\Component\String\AbstractString::toString() : string
public Symfony\Component\String\AbstractString::toUnicodeString() : Symfony\Component\String\UnicodeString
public trim(string $chars = '  ') : static
public trimEnd(string $chars = '  ') : static
public trimPrefix( $prefix) : static
public trimStart(string $chars = '  ') : static
public trimSuffix( $suffix) : static
public Symfony\Component\String\AbstractString::truncate(int $length, string $ellipsis = '', bool $cut = true) : static
public static Symfony\Component\String\AbstractString::unwrap(array $values) : array
 

Unwraps instances of AbstractString back to strings.

public upper() : static
public width(bool $ignoreAnsiDecoration = true) : int
public Symfony\Component\String\AbstractString::wordwrap(int $width = 75, string $break = ' ', bool $cut = false) : static
public static Symfony\Component\String\AbstractString::wrap(array $values) : array
 

Wraps (and normalizes) strings in instances of AbstractString.

Properties
protected Symfony\Component\String\AbstractString::$ignoreCase
protected Symfony\Component\String\AbstractString::$string
Constants
private Symfony\Component\String\AbstractUnicodeString::ASCII = ' eiasntrolud][cmp' g|hv.fb,:=-q10C2*yx)(L9AS/P"EjMIk3>5T<D4}B{8FwR67UGN;JzV#HOW_&!K?XQ%Y\ Z+~^$@` '
private Symfony\Component\String\AbstractUnicodeString::FOLD_FROM = ['İ', 'µ', 'ſ', 'ͅ', 'ς', 'ϐ', 'ϑ', 'ϕ', 'ϖ', 'ϰ', 'ϱ', 'ϵ', 'ẛ', 'ι', 'ß', 'İ', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'և', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ẞ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'ᾐ', 'ᾑ', 'ᾒ', 'ᾓ', 'ᾔ', 'ᾕ', 'ᾖ', 'ᾗ', 'ᾘ', 'ᾙ', 'ᾚ', 'ᾛ', 'ᾜ', 'ᾝ', 'ᾞ', 'ᾟ', 'ᾠ', 'ᾡ', 'ᾢ', 'ᾣ', 'ᾤ', 'ᾥ', 'ᾦ', 'ᾧ', 'ᾨ', 'ᾩ', 'ᾪ', 'ᾫ', 'ᾬ', 'ᾭ', 'ᾮ', 'ᾯ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'ᾼ', 'ῂ', 'ῃ', 'ῄ', 'ῆ', 'ῇ', 'ῌ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῲ', 'ῳ', 'ῴ', 'ῶ', 'ῷ', 'ῼ', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ']
private Symfony\Component\String\AbstractUnicodeString::FOLD_TO = ['i̇', 'μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι', 'ss', 'i̇', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'եւ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'aʾ', 'ss', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὰι', 'αι', 'άι', 'ᾶ', 'ᾶι', 'αι', 'ὴι', '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', 'ɼ', 'ɽ', 'ɾ', 'ʀ', 'ʂ', 'ʈ', 'ʉ', 'ʋ', 'ʏ', 'ʐ', 'ʑ', 'ʙ', 'ʛ', 'ʜ', 'ʝ', 'ʟ', 'ʠ', 'ʣ', 'ʥ', 'ʦ', 'ʪ', 'ʫ', 'ᴀ', 'ᴁ', 'ᴃ', 'ᴄ', 'ᴅ', 'ᴆ', 'ᴇ', 'ᴊ', 'ᴋ', 'ᴌ', 'ᴍ', 'ᴏ', 'ᴘ', 'ᴛ', 'ᴜ', 'ᴠ', 'ᴡ', 'ᴢ', 'ᵫ', 'ᵬ', 'ᵭ', 'ᵮ', 'ᵯ', 'ᵰ', 'ᵱ', 'ᵲ', 'ᵳ', 'ᵴ', 'ᵵ', 'ᵶ', 'ᵺ', 'ᵻ', 'ᵽ', 'ᵾ', 'ᶀ', 'ᶁ', 'ᶂ', 'ᶃ', 'ᶄ', 'ᶅ', 'ᶆ', 'ᶇ', 'ᶈ', 'ᶉ', 'ᶊ', 'ᶌ', 'ᶍ', 'ᶎ', 'ᶏ', 'ᶑ', 'ᶒ', 'ᶓ', 'ᶖ', 'ᶙ', 'ẚ', 'ẜ', 'ẝ', 'ẞ', 'Ỻ', 'ỻ', 'Ỽ', 'ỽ', 'Ỿ', 'ỿ', '©', '®', '₠', '₢', '₣', '₤', '₧', '₺', '₹', 'ℌ', '℞', '㎧', '㎮', '㏆', '㏗', '㏞', '㏟', '¼', '½', '¾', '⅓', '⅔', '⅕', '⅖', '⅗', '⅘', '⅙', '⅚', '⅛', '⅜', '⅝', '⅞', '⅟', '〇', '‘', '’', '‚', '‛', '“', '”', '„', '‟', '′', '″', '〝', '〞', '«', '»', '‹', '›', '‐', '‑', '‒', '–', '—', '―', '︱', '︲', '﹘', '‖', '⁄', '⁅', '⁆', '⁎', '、', '。', '〈', '〉', '《', '》', '〔', '〕', '〘', '〙', '〚', '〛', '︑', '︒', '︹', '︺', '︽', '︾', '︿', '﹀', '﹑', '﹝', '﹞', '⦅', '⦆', '。', '、', '×', '÷', '−', '∕', '∖', '∣', '∥', '≪', '≫', '⦅', '⦆']
private Symfony\Component\String\AbstractUnicodeString::TRANSLIT_TO = ['AE', 'D', 'O', 'TH', 'ss', 'ae', 'd', 'o', 'th', 'D', 'd', 'H', 'h', 'i', 'q', 'L', 'l', 'L', 'l', ''n', 'N', 'n', 'OE', 'oe', 'T', 't', 'b', 'B', 'B', 'b', 'C', 'c', 'D', 'D', 'D', 'd', 'E', 'F', 'f', 'G', 'hv', 'I', 'I', 'K', 'k', 'l', 'N', 'n', 'OI', 'oi', 'P', 'p', 't', 'T', 't', 'T', 'V', 'Y', 'y', 'Z', 'z', 'DZ', 'Dz', 'dz', 'G', 'g', 'd', 'Z', 'z', 'l', 'n', 't', 'j', 'db', 'qp', 'A', 'C', 'c', 'L', 'T', 's', 'z', 'B', 'U', 'E', 'e', 'J', 'j', 'R', 'r', 'Y', 'y', 'b', 'c', 'd', 'd', 'e', 'j', 'g', 'g', 'G', 'h', 'h', 'i', 'I', 'l', 'l', 'l', 'm', 'n', 'n', 'N', 'OE', 'r', 'r', 'r', 'R', 's', 't', 'u', 'v', 'Y', 'z', 'z', 'B', 'G', 'H', 'j', 'L', 'q', 'dz', 'dz', 'ts', 'ls', 'lz', 'A', 'AE', 'B', 'C', 'D', 'D', 'E', 'J', 'K', 'L', 'M', 'O', 'P', 'T', 'U', 'V', 'W', 'Z', 'ue', 'b', 'd', 'f', 'm', 'n', 'p', 'r', 'r', 's', 't', 'z', 'th', 'I', 'p', 'U', 'b', 'd', 'f', 'g', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'v', 'x', 'z', 'a', 'd', 'e', 'e', 'i', 'u', 'a', 's', 's', 'SS', 'LL', 'll', 'V', 'v', 'Y', 'y', '(C)', '(R)', 'CE', 'Cr', 'Fr.', 'L.', 'Pts', 'TL', 'Rs', 'x', 'Rx', 'm/s', 'rad/s', 'C/kg', 'pH', 'V/m', 'A/m', ' 1/4', ' 1/2', ' 3/4', ' 1/3', ' 2/3', ' 1/5', ' 2/5', ' 3/5', ' 4/5', ' 1/6', ' 5/6', ' 1/8', ' 3/8', ' 5/8', ' 7/8', ' 1/', '0', ''', ''', ',', ''', '"', '"', ',,', '"', ''', '"', '"', '"', '<<', '>>', '<', '>', '-', '-', '-', '-', '-', '-', '-', '-', '-', '||', '/', '[', ']', '*', ',', '.', '<', '>', '<<', '>>', '[', ']', '[', ']', '[', ']', ',', '.', '[', ']', '<<', '>>', '<', '>', ',', '[', ']', '((', '))', '.', ',', '*', '/', '-', '/', '\', '|', '||', '<<', '>>', '((', '))']
private Symfony\Component\String\AbstractUnicodeString::UPPER_FROM = ['ß', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'և', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ', 'ʼn', 'ΐ', 'ΰ', 'ǰ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾶ', 'ῆ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῶ']
private Symfony\Component\String\AbstractUnicodeString::UPPER_TO = ['SS', 'FF', 'FI', 'FL', 'FFI', 'FFL', 'ST', 'ST', 'ԵՒ', 'ՄՆ', 'ՄԵ', 'ՄԻ', 'ՎՆ', 'ՄԽ', 'ʼN', 'Ϊ́', 'Ϋ́', 'J̌', 'H̱', 'T̈', 'W̊', 'Y̊', 'Aʾ', 'Υ̓', 'Υ̓̀', 'Υ̓́', 'Υ̓͂', 'Α͂', 'Η͂', 'Ϊ̀', 'Ϊ́', 'Ι͂', 'Ϊ͂', 'Ϋ̀', 'Ϋ́', 'Ρ̓', 'Υ͂', 'Ϋ͂', 'Ω͂']
Properties
private static $tableWide
private static $tableZero
private static $transliterators
Methods
private pad(int $len, self $pad, int $type) : static
private wcswidth(string $string) : int
Properties
private static $tableWide
private static $tableZero
private static $transliterators
Methods
public static fromCodePoints(int $codes) : static
public static Symfony\Component\String\AbstractString::unwrap(array $values) : array
 

Unwraps instances of AbstractString back to strings.

public static Symfony\Component\String\AbstractString::wrap(array $values) : array
 

Wraps (and normalizes) strings in instances of AbstractString.

© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration