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
Descripción
Object oriented style
string
Collator::getSortKey
( string $str
)
Procedural style
Return collation key for a string.
Valores devueltos
Returns the collation key for the string. Collation keys can be compared directly instead of strings.
Warning
Esta función quizá devuelve Boolean FALSE, pero quizá también devuelve un valor non-Boolean que se evaluará como FALSE, como 0 o "". Por favor lea la sección en Booleans para más información. Use el operador === para testear el valor devuelto por esta función.
Ejemplos
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);
?>
El resultado del ejemplo sería:
71%3F%3FE%01%09%01%8F%08%00
Ver también
- 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.
