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
[edit] Last updated: Sat, 07 Jan 2012

view this page in

Collator::getSortKey

collator_get_sort_key

(No version information available, might only be in SVN)

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

설명

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.

인수

coll

Collator object.

str

The string to produce the key from.

반환값

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

Warning

이 함수는 논리 FALSE를 반환하지만, 0이나 "" 등, 논리 FALSE로 취급할 수 있는 다른 값을 반환할 수 있습니다. 자세한 정보는 논리형 섹션을 참고하십시오. 이 함수의 반환값을 확인하려면 === 연산자를 이용하십시오.

예제

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);
?>

위 예제의 출력:


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

참고



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

 
show source | credits | stats | sitemap | contact | advertising | mirror sites