PHP 8.3.4 Released!

Collator::create

collator_create

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

Collator::create -- collator_createcollator を作成する

説明

オブジェクト指向型

public static Collator::create(string $locale): ?Collator

手続き型

collator_create(string $locale): ?Collator

すでに指定しているオプションを用いて文字列を比較します。

パラメータ

locale

照合規則を使用するロケール。特殊な場合として、 空文字列を渡した場合はデフォルトのロケールの照合規則を使用します。 "root" を渡した場合は » UCA の規則を使用します。

戻り値

新しい Collator オブジェクトのインスタンス、 あるいはエラー時に null を返します。

例1 collator_create() の例

<?php
$coll
= collator_create( 'en_US' );

if( !isset(
$coll ) ) {
printf( "Collator creation failed: %s\n", intl_get_error_message() );
exit(
1 );
}
?>

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top