Joomla Platform
13.1
Documentation des API du framework Joomla Platform
|
Fonctions membres publiques statiques | |
static | splitCamelCase ($string) |
static | increment ($string, $style= 'default', $n=0) |
static | strpos ($str, $search, $offset=false) |
static | strrpos ($str, $search, $offset=0) |
static | substr ($str, $offset, $length=false) |
static | strtolower ($str) |
static | strtoupper ($str) |
static | strlen ($str) |
static | str_ireplace ($search, $replace, $str, $count=null) |
static | str_split ($str, $split_len=1) |
static | strcasecmp ($str1, $str2, $locale=false) |
static | strcmp ($str1, $str2, $locale=false) |
static | strcspn ($str, $mask, $start=null, $length=null) |
static | stristr ($str, $search) |
static | strrev ($str) |
static | strspn ($str, $mask, $start=null, $length=null) |
static | substr_replace ($str, $repl, $start, $length=null) |
static | ltrim ($str, $charlist=false) |
static | rtrim ($str, $charlist=false) |
static | trim ($str, $charlist=false) |
static | ucfirst ($str, $delimiter=null, $newDelimiter=null) |
static | ucwords ($str) |
static | transcode ($source, $from_encoding, $to_encoding) |
static | valid ($str) |
static | compliant ($str) |
static | parse_url ($url) |
Attributs protégés statiques | |
static | $incrementStyles |
Définition à la ligne 47 du fichier string.php.
|
static |
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)
string | $str | UTF-8 string to check |
Définition à la ligne 919 du fichier string.php.
Références strlen().
|
static |
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"
string | $string | The source string. |
string | $style | The the style (default|dash). |
integer | $n | If supplied, this number is used for the copy, otherwise it is the 'next' number. |
Définition à la ligne 107 du fichier string.php.
Référencé par JModelAdmin\generateNewTitle().
|
static |
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
string | $str | The string to be trimmed |
string | $charlist | The optional charlist of additional characters to trim |
Définition à la ligne 585 du fichier string.php.
Références jimport(), et utf8_ltrim().
|
static |
Does a UTF-8 safe version of PHP parse_url function
string | $url | URL to parse |
Définition à la ligne 945 du fichier string.php.
Référencé par JUri\parse(), JFormRuleUrl\test(), JStringPunycode\urlToPunycode(), et JStringPunycode\urlToUTF8().
|
static |
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
string | $str | The string to be trimmed |
string | $charlist | The optional charlist of additional characters to trim |
Définition à la ligne 619 du fichier string.php.
Références jimport(), et utf8_rtrim().
|
static |
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")),
string | $string | The source string. |
Définition à la ligne 84 du fichier string.php.
Références JLog\add(), JStringNormalise\fromCamelCase(), et JLog\WARNING.
|
static |
UTF-8 aware alternative to str_ireplace Case-insensitive version of str_replace
string | $search | String to search |
string | $replace | Existing string to replace |
string | $str | New string to replace with |
integer | $count | Optional count value to be passed by referene |
Définition à la ligne 289 du fichier string.php.
Références jimport(), et utf8_ireplace().
Référencé par JTableContent\check().
|
static |
UTF-8 aware alternative to str_split Convert a string to an array
string | $str | UTF-8 encoded string to process |
integer | $split_len | Number to characters to split string by |
Définition à la ligne 315 du fichier string.php.
Références jimport(), et utf8_str_split().
|
static |
UTF-8/LOCALE aware alternative to strcasecmp A case insensitive string comparison
string | $str1 | string 1 to compare |
string | $str2 | string 2 to compare |
mixed | $locale | The locale used by strcoll or false to use classical comparison |
Définition à la ligne 337 du fichier string.php.
Références stristr(), utf8_strcasecmp(), et utf8_strtolower().
Référencé par JArrayHelper\_sortObjects().
|
static |
UTF-8/LOCALE aware alternative to strcmp A case sensitive string comparison
string | $str1 | string 1 to compare |
string | $str2 | string 2 to compare |
mixed | $locale | The locale used by strcoll or false to use classical comparison |
Définition à la ligne 397 du fichier string.php.
Références stristr().
Référencé par JArrayHelper\_sortObjects().
|
static |
UTF-8 aware alternative to strcspn Find length of initial segment not matching mask
string | $str | The string to process |
string | $mask | The mask |
integer | $start | Optional starting character position (in characters) |
integer | $length | Optional length |
Définition à la ligne 453 du fichier string.php.
Références jimport(), et utf8_strcspn().
|
static |
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
string | $str | The haystack |
string | $search | The needle |
Définition à la ligne 485 du fichier string.php.
Références jimport(), et utf8_stristr().
Référencé par strcasecmp(), et strcmp().
|
static |
UTF-8 aware alternative to strlen.
Returns the number of characters in the string (NOT THE NUMBER OF BYTES),
string | $str | UTF-8 string. |
Définition à la ligne 270 du fichier string.php.
Références utf8_strlen().
Référencé par compliant(), et valid().
|
static |
UTF-8 aware alternative to strpos.
Find position of first occurrence of a string.
string | $str | String being examined |
string | $search | String being searched for |
integer | $offset | Optional, specifies the position from which the search should be performed |
Définition à la ligne 162 du fichier string.php.
Références utf8_strpos().
|
static |
UTF-8 aware alternative to strrev Reverse a string
string | $str | String to be reversed |
Définition à la ligne 503 du fichier string.php.
Références jimport(), et utf8_strrev().
|
static |
UTF-8 aware alternative to strrpos Finds position of last occurrence of a string
string | $str | String being examined. |
string | $search | String being searched for. |
integer | $offset | Offset from the left of the string. |
Définition à la ligne 187 du fichier string.php.
Références utf8_strrpos().
|
static |
UTF-8 aware alternative to strspn Find length of initial segment matching mask
string | $str | The haystack |
string | $mask | The mask |
integer | $start | Start optional |
integer | $length | Length optional |
Définition à la ligne 524 du fichier string.php.
Références jimport(), et utf8_strspn().
|
static |
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
string | $str | String being processed |
Définition à la ligne 233 du fichier string.php.
Références utf8_strtolower().
Référencé par JStringInflector\_getCachedPlural(), JStringInflector\_getCachedSingular(), JStringInflector\_setCache(), JFilterOutput\stringURLSafe(), JFilterOutput\stringURLUnicodeSlug(), et JLanguage\transliterate().
|
static |
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
string | $str | String being processed |
Définition à la ligne 253 du fichier string.php.
Références utf8_strtoupper().
|
static |
UTF-8 aware alternative to substr Return part of a string given character offset (and optionally length)
string | $str | String being processed |
integer | $offset | Number of UTF-8 characters offset (from left) |
integer | $length | Optional length in UTF-8 characters from offset |
Définition à la ligne 205 du fichier string.php.
Références utf8_substr().
|
static |
UTF-8 aware substr_replace Replace text within a portion of a string
string | $str | The haystack |
string | $repl | The replacement string |
integer | $start | Start |
integer | $length | Length (optional) |
Définition à la ligne 556 du fichier string.php.
Références utf8_substr_replace().
|
static |
Transcode a string.
string | $source | The string to transcode. |
string | $from_encoding | The source encoding. |
string | $to_encoding | The target encoding. |
Définition à la ligne 736 du fichier string.php.
|
static |
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
string | $str | The string to be trimmed |
string | $charlist | The optional charlist of additional characters to trim |
Définition à la ligne 653 du fichier string.php.
Références jimport(), et utf8_trim().
|
static |
UTF-8 aware alternative to ucfirst Make a string's first character uppercase or all words' first character uppercase
string | $str | String to be processed |
string | $delimiter | The words delimiter (null means do not split the string) |
string | $newDelimiter | The new words delimiter (null means equal to $delimiter) |
Définition à la ligne 687 du fichier string.php.
Références jimport(), et utf8_ucfirst().
Référencé par JFormField\__construct(), et JFormHelper\loadClass().
|
static |
UTF-8 aware alternative to ucwords Uppercase the first character of each word in a string
string | $str | String to be processed |
Définition à la ligne 716 du fichier string.php.
Références jimport(), et utf8_ucwords().
|
static |
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.
string | $str | UTF-8 encoded string. |
End of the multi-octet sequence. mUcs4 now contains the final Unicode codepoint to be output
((0xC0 & (*in) != 0x80) && (mState != 0)) Incomplete multi-octet sequence.
Définition à la ligne 767 du fichier string.php.
Références strlen().
Référencé par JFormRuleUrl\test().
|
staticprotected |
Définition à la ligne 55 du fichier string.php.