Collator::getSortKey
collator_get_sort_key
(No version information available, might only be in SVN)
Collator::getSortKey -- collator_get_sort_key — Get sorting key for a string
Descrizione
Stile orientato agli oggetti
string
Collator::getSortKey
( string
$str
)Stile procedurale
Return collation key for a string.
Valori restituiti
Returns the collation key for the string. Collation keys can be compared directly instead of strings.
Avviso
Questa funzione può
restituire il Booleano FALSE, ma può anche restituire un valore non-Booleano valutato
come FALSE. Fare riferimento alla sezione Booleans per maggiori
informazioni. Usare l'operatore ===
per controllare il valore restituito da questa
funzione.
Esempi
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);
?>
Il precedente esempio visualizzerà:
71%3F%3FE%01%09%01%8F%08%00
Vedere anche:
- collator_sort() - Sort array using specified collator
- collator_sort_with_sort_keys() - Sort array using specified collator and sort keys
There are no user contributed notes for this page.
