String handling class for utf-8 data Wraps the phputf8 library All functions assume the validity of utf-8 strings.
Located in /libraries/joomla/string/string.php (line 47)
Increment styles.
Tests whether a string complies as UTF-8. This will be much
faster than utf8_is_valid but will pass five and six octet UTF-8 sequences, which are not supported by Unicode and so cannot be displayed correctly in a browser. In other words it is not as strict as utf8_is_valid but it's faster. If you use it to validate user input, you place yourself at the risk that attackers will be able to inject 5 and 6 byte sequences (which may or may not be a significant risk, depending on what you are are doing)
Increments a trailing number in a string.
Used to easily create distinct labels when copying objects. The method has the following styles:
default: "Label" becomes "Label (2)" dash: "Label" becomes "Label-2"
UTF-8 aware replacement for ltrim()
Strip whitespace (or other characters) from the beginning of a string You only need to use this if you are supplying the charlist optional arg and it contains UTF-8 characters. Otherwise ltrim will work normally on a UTF-8 string
Does a UTF-8 safe version of PHP parse_url function
UTF-8 aware replacement for rtrim()
Strip whitespace (or other characters) from the end of a string You only need to use this if you are supplying the charlist optional arg and it contains UTF-8 characters. Otherwise rtrim will work normally on a UTF-8 string
Split a string in camel case format
"FooBarABCDef" becomes array("Foo", "Bar", "ABC", "Def"); "JFooBar" becomes array("J", "Foo", "Bar"); "J001FooBar002" becomes array("J001", "Foo", "Bar002"); "abcDef" becomes array("abc", "Def"); "abc_defGhi_Jkl" becomes array("abc_def", "Ghi_Jkl"); "ThisIsA_NASAAstronaut" becomes array("This", "Is", "A_NASA", "Astronaut")), "JohnFitzgerald_Kennedy" becomes array("John", "Fitzgerald_Kennedy")),
UTF-8/LOCALE aware alternative to strcasecmp A case insensitive string comparison
UTF-8/LOCALE aware alternative to strcmp A case sensitive string comparison
UTF-8 aware alternative to strcspn Find length of initial segment not matching mask
UTF-8 aware alternative to stristr Returns all of haystack from the first occurrence of needle to the end.
needle and haystack are examined in a case-insensitive manner Find first occurrence of a string using case insensitive comparison
UTF-8 aware alternative to strlen.
Returns the number of characters in the string (NOT THE NUMBER OF BYTES),
UTF-8 aware alternative to strpos.
Find position of first occurrence of a string.
UTF-8 aware alternative to strrev Reverse a string
UTF-8 aware alternative to strrpos Finds position of last occurrence of a string
UTF-8 aware alternative to strspn Find length of initial segment matching mask
UTF-8 aware alternative to strtlower
Make a string lowercase Note: The concept of a characters "case" only exists is some alphabets such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does not exist in the Chinese alphabet, for example. See Unicode Standard Annex #21: Case Mappings
UTF-8 aware alternative to strtoupper
Make a string uppercase Note: The concept of a characters "case" only exists is some alphabets such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does not exist in the Chinese alphabet, for example. See Unicode Standard Annex #21: Case Mappings
UTF-8 aware alternative to str_ireplace Case-insensitive version of str_replace
UTF-8 aware alternative to str_split Convert a string to an array
UTF-8 aware alternative to substr Return part of a string given character offset (and optionally length)
UTF-8 aware substr_replace Replace text within a portion of a string
Transcode a string.
UTF-8 aware replacement for trim()
Strip whitespace (or other characters) from the beginning and end of a string Note: you only need to use this if you are supplying the charlist optional arg and it contains UTF-8 characters. Otherwise trim will work normally on a UTF-8 string
UTF-8 aware alternative to ucfirst Make a string's first character uppercase or all words' first character uppercase
UTF-8 aware alternative to ucwords Uppercase the first character of each word in a string
Tests a string as to whether it's valid UTF-8 and supported by the Unicode standard.
Note: this function has been modified to simple return true or false.
Documentation generated on Tue, 19 Nov 2013 15:14:34 +0100 by phpDocumentor 1.4.3