Wikibase
MediaWiki Wikibase extension
|
StringNormalizer provides several methods for normalizing strings. More...
Public Member Functions | |
trimBadChars (string $string) | |
Remove incomplete UTF-8 sequences from the beginning and end of the string. | |
trimWhitespace (string $inputString) | |
Trim initial and trailing whitespace and control chars, and compress some internal control chars. | |
cleanupToNFC (string $inputString) | |
Normalize string into NFC by using the cleanup method from UtfNormal. | |
trimToNFC (string $inputString) | |
Do a cleanupToNFC after the string is trimmed. | |
Protected Member Functions | |
removeBadCharLast (string $string) | |
Remove bytes that represent an incomplete Unicode character at the end of string (e.g. | |
removeBadCharFirst (string $string) | |
Remove bytes that represent an incomplete Unicode character at the start of string (e.g. | |
StringNormalizer provides several methods for normalizing strings.
Wikibase\Lib\StringNormalizer::cleanupToNFC | ( | string | $inputString | ) |
Normalize string into NFC by using the cleanup method from UtfNormal.
|
protected |
Remove bytes that represent an incomplete Unicode character at the start of string (e.g.
bytes of the char are missing)
|
protected |
Remove bytes that represent an incomplete Unicode character at the end of string (e.g.
bytes of the char are missing)
Wikibase\Lib\StringNormalizer::trimBadChars | ( | string | $string | ) |
Remove incomplete UTF-8 sequences from the beginning and end of the string.
Wikibase\Lib\StringNormalizer::trimToNFC | ( | string | $inputString | ) |
Do a cleanupToNFC after the string is trimmed.
Wikibase\Lib\StringNormalizer::trimWhitespace | ( | string | $inputString | ) |
Trim initial and trailing whitespace and control chars, and compress some internal control chars.