Collator::sortWithSortKeys
collator_sort_with_sort_keys
(No version information available, might be only in CVS)
Collator::sortWithSortKeys -- collator_sort_with_sort_keys — 指定した collator とキーで配列を並べ替える
説明
オブジェクト指向型
bool
Collator::sortWithSortKeys
( 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', )
Collator::sortWithSortKeys
There are no user contributed notes for this page.
