(No version information available, might be only in CVS)
Collator::compare -- collator_compare — ふたつの Unicode 文字列を比較する
オブジェクト指向型
手続き型
ふたつの Unicode 文字列を、比較規則にもとづいて比較します。
比較結果を返します。
str1 が str2 より 大きい ときは 1
str1 と str2 が 等しい ときは 0
str1 が str2 より 小さい ときは -1
例1 collator_compare() の例
<?php
$s1 = 'Hello';
$s2 = 'hello';
$coll = collator_create( 'en_US' );
$res = collator_compare( $coll, $s1, $s2 );
if ($res === false) {
echo collator_get_error_message( $coll );
} else if( $res > 0 ) {
echo "s1 is greater than s2\n";
} else if( $res < 0 ) {
echo "s1 is less than s2\n";
} else {
echo "s1 is equal to s2\n";
?>
上の例の出力は以下となります。
s1 is greater than s2
NPO法人の設立(東京・大阪) 東京や大阪などNPO法人を設立する場合の注意点等を紹介
不動産・賃貸・マンション 不動産・賃貸・マンションに関する用語集です。
堺市の入院・内科大阪の賃貸探し 大阪で賃貸を探している方は大阪ホームへ
東京の賃貸マンション 東京で賃貸を探すなら東京賃貸.orgへ