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, 13 Nov 2009

view this page in

Collator::getSortKey

collator_get_sort_key

()

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

Descrição

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.

Parâmetros

coll

Collator object.

str

The string to produce the key from.

Valor Retornado

Returns the collation key for the string. Collation keys can be compared directly instead of strings.

Aviso

Esta função pode retornar o booleano FALSE, mas também pode retornar um valor não-booleano que pode ser avaliado como FALSE, como 0 ou "". Leia a seção em Booleanos para maiores informações. Utilize o operador === para testar o valor retornado por esta função.

Exemplos

Exemplo #1 collator_get_sort_key()example

<?php
$s1 
'Hello';

$coll collator_create'en_US' );
$res  collator_get_sort_key$coll$s1);

echo 
urlencode($res);
?>

O exemplo acima irá imprimir:


71%3F%3FE%01%09%01%8F%08%00

Veja Também

  • 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, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites