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

search for in the

Collator::sort> <Collator::setStrength
Last updated: Fri, 13 Nov 2009

view this page in

Collator::sortWithSortKeys

collator_sort_with_sort_keys

(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)

Collator::sortWithSortKeys -- collator_sort_with_sort_keys指定した collator とキーで配列を並べ替える

説明

オブジェクト指向型

bool Collator::sortWithSortKeys ( array &$arr )

手続き型

bool collator_sort_with_sort_keys ( Collator $coll , array &$arr )

collator_sort() と似ていますが、 ucol_getSortKey() が作成した ICU ソートキーを用いることで 大きな配列をより高速に処理できます。

パラメータ

coll

Collator オブジェクト。

arr

並べ替えたい文字列の配列。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例1 collator_sort_with_sort_keys() の例

<?php
$arr  
= array( 'Köpfe''Kypper''Kopfe' );
$coll collator_create'sv' );

collator_sort_with_sort_keys$coll$arr );
var_export$arr );
?>

上の例の出力は以下となります。

array (
  0 => 'Kopfe',
  1 => 'Kypper',
  2 => 'Köpfe',
)

参考



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

Collator::sort> <Collator::setStrength
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites