[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 180 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
getCollator() X-Ref |
Initialization of a collator using $conf['lang'] as the locale. The initialization is done only once. The collation takes "natural ordering" into account, that is, "page 2" is before "page 10". author: Moisés Braga Ribeiro <moisesbr@gmail.com> return: \Collator Returns a configured collator or null if the collator cannot be created. |
useIntl($use = true) X-Ref |
Enable or disable the use of the "intl" extension collator. This is used for testing and should not be used in normal code. author: Andreas Gohr <andi@splitbrain.org> param: bool $use |
strcmp($str1, $str2) X-Ref |
Drop-in replacement for strcmp(), strcasecmp(), strnatcmp() and strnatcasecmp(). It uses a collator-based comparison, or strnatcasecmp() as a fallback. author: Moisés Braga Ribeiro <moisesbr@gmail.com> return: int Returns < 0 if $str1 is less than $str2; > 0 if $str1 is greater than $str2, and 0 if they are equal. param: string $str1 The first string. param: string $str2 The second string. |
sort(&$array) X-Ref |
Drop-in replacement for sort(). It uses a collator-based sort, or sort() with flags SORT_NATURAL and SORT_FLAG_CASE as a fallback. author: Moisés Braga Ribeiro <moisesbr@gmail.com> return: bool Returns true on success or false on failure. param: array $array The input array. |
ksort(&$array) X-Ref |
Drop-in replacement for ksort(). It uses a collator-based sort, or ksort() with flags SORT_NATURAL and SORT_FLAG_CASE as a fallback. author: Moisés Braga Ribeiro <moisesbr@gmail.com> return: bool Returns true on success or false on failure. param: array $array The input array. |
asort(&$array) X-Ref |
Drop-in replacement for asort(), natsort() and natcasesort(). It uses a collator-based sort, or asort() with flags SORT_NATURAL and SORT_FLAG_CASE as a fallback. author: Moisés Braga Ribeiro <moisesbr@gmail.com> return: bool Returns true on success or false on failure. param: array $array The input array. |
asortFN(&$array) X-Ref |
Drop-in replacement for asort(), natsort() and natcasesort() when the parameter is an array of filenames. Filenames may not be equal to page names, depending on the setting in $conf['fnencode'], so the correct behavior is to sort page names and reflect this sorting in the filename array. author: Moisés Braga Ribeiro <moisesbr@gmail.com> author: Andreas Gohr <andi@splitbrain.org> return: bool Returns true on success or false on failure. param: array $array The input array. |