Copied!

Represents a string of Unicode code points encoded as UTF-8.

CloneableInstantiable
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 __construct(string $string = '')
public Symfony\Component\String\AbstractString::__sleep() : array
public Symfony\Component\String\AbstractString::__toString() : string
public Symfony\Component\String\AbstractString::after(iterable|string $needle, bool $includeNeedle = false, int $offset = 0) : static
 
  • param string|string[] $needle
public Symfony\Component\String\AbstractString::afterLast(iterable|string $needle, bool $includeNeedle = false, int $offset = 0) : static
 
  • param string|string[] $needle
public append(string $suffix) : static
public Symfony\Component\String\AbstractUnicodeString::ascii(array $rules = []) : self
 

Generic UTF-8 to ASCII transliteration.

Install the intl extension for best results.

  • param string[]|Transliterator[]|Closure[] $rules See "*-Latin" rules from Transliterator::listIDs()
public Symfony\Component\String\AbstractString::before(iterable|string $needle, bool $includeNeedle = false, int $offset = 0) : static
 
  • param string|string[] $needle
public Symfony\Component\String\AbstractString::beforeLast(iterable|string $needle, bool $includeNeedle = false, int $offset = 0) : static
 
  • param string|string[] $needle
public Symfony\Component\String\AbstractString::bytesAt(int $offset) : array
 
  • return int[]
public Symfony\Component\String\AbstractUnicodeString::camel() : static
public chunk(int $length = 1) : array
public codePointsAt(int $offset) : array
public Symfony\Component\String\AbstractString::collapseWhitespace() : static
public Symfony\Component\String\AbstractString::containsAny(iterable|string $needle) : bool
 
  • param string|string[] $needle
public endsWith(Symfony\Component\String\AbstractString|iterable|string $suffix) : bool
public Symfony\Component\String\AbstractString::ensureEnd(string $suffix) : static
public Symfony\Component\String\AbstractString::ensureStart(string $prefix) : static
public equalsTo(Symfony\Component\String\AbstractString|iterable|string $string) : bool
public Symfony\Component\String\AbstractUnicodeString::folded(bool $compat = true) : static
public static Symfony\Component\String\AbstractUnicodeString::fromCodePoints(int $codes) : static
public Symfony\Component\String\AbstractString::ignoreCase() : static
public indexOf(Symfony\Component\String\AbstractString|iterable|string $needle, int $offset = 0) : ?int
public indexOfLast(Symfony\Component\String\AbstractString|iterable|string $needle, int $offset = 0) : ?int
public Symfony\Component\String\AbstractString::isEmpty() : bool
public Symfony\Component\String\AbstractUnicodeString::join(array $strings, ?string $lastGlue = NULL) : static
public Symfony\Component\String\AbstractString::jsonSerialize() : string
public length() : int
public Symfony\Component\String\AbstractUnicodeString::lower() : static
public Symfony\Component\String\AbstractUnicodeString::match(string $regexp, int $flags = 0, int $offset = 0) : array
public Symfony\Component\String\AbstractUnicodeString::normalize(int $form = 16self::NFC) : static
public Symfony\Component\String\AbstractUnicodeString::padBoth(int $length, string $padStr = ' ') : static
public Symfony\Component\String\AbstractUnicodeString::padEnd(int $length, string $padStr = ' ') : static
public Symfony\Component\String\AbstractUnicodeString::padStart(int $length, string $padStr = ' ') : static
public prepend(string $prefix) : static
public Symfony\Component\String\AbstractString::repeat(int $multiplier) : static
public replace(string $from, string $to) : static
public Symfony\Component\String\AbstractUnicodeString::replaceMatches(string $fromRegexp, callable|string $to) : static
public Symfony\Component\String\AbstractUnicodeString::reverse() : static
public slice(int $start = 0, ?int $length = NULL) : static
public Symfony\Component\String\AbstractUnicodeString::snake() : static
public splice(string $replacement, int $start = 0, ?int $length = NULL) : static
public split(string $delimiter, ?int $limit = NULL, ?int $flags = NULL) : array
public startsWith(Symfony\Component\String\AbstractString|iterable|string $prefix) : bool
public Symfony\Component\String\AbstractUnicodeString::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 Symfony\Component\String\AbstractUnicodeString::trim(string $chars = '  ') : static
public Symfony\Component\String\AbstractUnicodeString::trimEnd(string $chars = '  ') : static
public Symfony\Component\String\AbstractUnicodeString::trimPrefix( $prefix) : static
public Symfony\Component\String\AbstractUnicodeString::trimStart(string $chars = '  ') : static
public Symfony\Component\String\AbstractUnicodeString::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.

  • return string[]|array
public Symfony\Component\String\AbstractUnicodeString::upper() : static
public Symfony\Component\String\AbstractUnicodeString::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.

  • return static[]|array
Properties
protected Symfony\Component\String\AbstractString::$ignoreCase
protected Symfony\Component\String\AbstractString::$string
Methods
public static Symfony\Component\String\AbstractUnicodeString::fromCodePoints(int $codes) : static
public static Symfony\Component\String\AbstractString::unwrap(array $values) : array
 

Unwraps instances of AbstractString back to strings.

  • return string[]|array
public static Symfony\Component\String\AbstractString::wrap(array $values) : array
 

Wraps (and normalizes) strings in instances of AbstractString.

  • return static[]|array
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration