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

search for in the

Collator> <Örnekler
[edit] Last updated: Fri, 23 Mar 2012

view this page in

Bu eklentinin temel kullanımı

Her modül iki çeşit API içerir: Yordamsal ve nesne yönelimli. Bunlar, ilgili belgelerde de açıklandığı gibi birbirlerine eşdeğerdir.

Bilginize:

Tüm girdi dizgeleri UTF-8 olmak zorundadır. Tüm çıktılar da ayrıca UTF-8'dir.

Örnek 1 - Yordamsal API kullanım örneği

<?php
$coll  
collator_create('en_US');
$result collator_compare($coll"string#1""string#2");
?>

Örnek 2 - Nesne yönelimli API kullanım örneği

<?php
$coll 
= new Collator('en_US');
$al   $coll->getLocale(Locale::ACTUAL_LOCALE);
echo 
"Asıl yerel: $al\n";

$formatter = new NumberFormatter('en_US'NumberFormatter::DECIMAL);
echo 
$formatter->format(1234567);
?>


add a note add a note User Contributed Notes Bu eklentinin temel kullanımı
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites