Collator::getSortKey
collator_get_sort_key
()
Collator::getSortKey -- collator_get_sort_key — Get sorting key for a string
Descrierea
Object oriented style
string
Collator::getSortKey
( string $str
)
Procedural style
Return collation key for a string.
Valorile întroarse
Returns the collation key for the string. Collation keys can be compared directly instead of strings.
Avertizare
Această funcţie poate întoarce valoarea Boolean FALSE, dar poate de asemenea întoarce o valoare non-Boolean care evaluează în FALSE, cum ar fi 0 sau "". Vă rugăm să citiţi secţiunea despre tipul Boolean pentru mai multe informaţii. Utilizaţi operatorul === pentru a verifica valoarea întoarsă de această funcţie.
Exemple
Example #1 collator_get_sort_key()example
<?php
$s1 = 'Hello';
$coll = collator_create( 'en_US' );
$res = collator_get_sort_key( $coll, $s1);
echo urlencode($res);
?>
Exemplul de mai sus va afişa:
71%3F%3FE%01%09%01%8F%08%00
Collator::getSortKey
There are no user contributed notes for this page.
