CMSimple_XH 開発者ドキュメント
utf8.php ファイル

[ソースコード]

名前空間

 XH
 

関数

 utf8_strlen ($string)
 
 utf8_substr ($string, $offset, $length=null)
 
 utf8_strtolower ($string)
 
 utf8_strtoupper ($string)
 
 utf8_strpos ($haystack, $needle, $offset=0)
 
 utf8_stripos ($haystack, $needle, $offset=0)
 
 utf8_ucfirst ($string)
 
 utf8_is_valid ($string)
 
 utf8_bad_replace ($string, $replace='?')
 

詳解

UTF-8 related string functions.

utf8.php に定義があります。

関数詳解

◆ utf8_bad_replace()

utf8_bad_replace (   $string,
  $replace = '?' 
)

Replace bad bytes with an alternative character - ASCII character recommended is replacement char.

PCRE Pattern to locate bad bytes in a UTF-8 string Comes from W3 FAQ: Multilingual Forms.

Note: modified to include full ASCII range including control chars

引数
string$stringA string to search.
string$replaceA string to replace bad bytes with - use ASCII.
戻り値
string
参照
http://www.w3.org/International/questions/qa-forms-utf-8

utf8.php167 行目に定義があります。

◆ utf8_is_valid()

utf8_is_valid (   $string)

Tests a string as to whether it's valid UTF-8 and supported by the Unicode standard.

引数
string$stringA UTF-8 encoded string.
戻り値
boolean

utf8.php139 行目に定義があります。

◆ utf8_stripos()

utf8_stripos (   $haystack,
  $needle,
  $offset = 0 
)

Finds position of first occurrence of a string within another, case insensitive. Returns false if needle is not found.

引数
string$haystackA haystack.
string$needleA needle.
int$offsetAn offset in Unicode code points.
戻り値
int

utf8.php106 行目に定義があります。

◆ utf8_strlen()

utf8_strlen (   $string)

Returns the number of Unicode code points in a string.

Note: this function does not count bad bytes in the string - these are simply ignored.

引数
string$stringA UTF-8 encoded string.
戻り値
int

utf8.php28 行目に定義があります。

◆ utf8_strpos()

utf8_strpos (   $haystack,
  $needle,
  $offset = 0 
)

Finds position of first occurrence of a string within another, case sensitive. Returns false if needle is not found.

引数
string$haystackA haystack.
string$needleA needle.
int$offsetAn offset in Unicode code points.
戻り値
int

utf8.php91 行目に定義があります。

◆ utf8_strtolower()

utf8_strtolower (   $string)

Makes a string lowercase.

Note: The concept of a characters "case" only exists is some alphabets such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does not exist in the Chinese alphabet, for example. See Unicode Standard Annex #21: Case Mappings.

引数
string$stringA UTF-8 encoded string.
戻り値
string

utf8.php59 行目に定義があります。

◆ utf8_strtoupper()

utf8_strtoupper (   $string)

Makes a string uppercase.

Note: The concept of a characters "case" only exists is some alphabets such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does not exist in the Chinese alphabet, for example. See Unicode Standard Annex #21: Case Mappings.

引数
string$stringA UTF-8 encoded string.
戻り値
string

utf8.php76 行目に定義があります。

◆ utf8_substr()

utf8_substr (   $string,
  $offset,
  $length = null 
)

Returns part of a string given character offset and optionally length.

引数
string$stringA UTF-8 encoded string.
int$offsetA number of UTF-8 code points offset.
int$lengthA length in UTF-8 code points from offset
戻り値
string

utf8.php42 行目に定義があります。

◆ utf8_ucfirst()

utf8_ucfirst (   $string)

Makes a string's first character uppercase.

引数
string$stringA UTF-8 encoded string.
戻り値
string

utf8.php118 行目に定義があります。