downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Collator::getStrength> <Collator::getLocale
Last updated: Fri, 20 Nov 2009

view this page in

Collator::getSortKey

collator_get_sort_key

()

Collator::getSortKey -- collator_get_sort_keyGet sorting key for a string

Descrierea

Object oriented style

string Collator::getSortKey ( string $str )

Procedural style

string collator_get_sort_key ( Collator $coll , string $str )

Return collation key for a string.

Parametri

coll

Collator object.

str

The string to produce the key from.

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

Vedeţi de asemenea

  • collator_sort() - Sort array using specified collator
  • collator_sort_with_keys()



add a note add a note User Contributed Notes
Collator::getSortKey
There are no user contributed notes for this page.

Collator::getStrength> <Collator::getLocale
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites