|
Collator::comparecollator_compareふたつの Unicode 文字列を比較する 説明オブジェクト指向型
public intfalse Collator::compare(string
$string1 , string $string2 )手続き型 intfalse collator_compare(Collator
$object , string $string1 , string $string2 )ふたつの Unicode 文字列を、比較規則にもとづいて比較します。 パラメータ
戻り値比較結果を返します。
false を返します。
例
例1 collator_compare の例
<?php 上の例の出力は以下となります。 s1 is greater than s2
例2 ダイアクリティカルマークや、大文字小文字の区別を無視して比較する
<?php 上の例の出力は以下となります。 The same この例は、collator に基本的な文字のみを考慮するように指示します。 Collator->setStrength のドキュメントは、照合強度の違いについて説明しています。 参考
|