[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/data/utf8/ -> utf8_funcs.php (sommaire)

utf8 interrelated functions

Poids: 190 lignes (5 kb)
Inclus ou requis:0 fois
Référencé: 2 fois
Nécessite: 0 fichiers

Définit 4 fonctions

  utf8_isValidChar()
  utf8_substr()
  utf8_strlen()
  utf8_proportion()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

utf8_isValidChar($inputStr, $start = 0)   X-Ref
int utf8_isValidChar(string $inputStr, $start = 0)
Is it a valid utf8 character

param: $inputStr input string
param: $start start index
return: the ascii bytes of the utf8 char if it is a valid utf8 char. 0 if input array is empty, or -1 if it's invalid

utf8_substr($inputStr, $start, $length = -1, $ignore_error = true)   X-Ref
mix utf8_substr(string $inputString, int $start_index, int $length = -1, bool $ignore_invalid_utf8_char = true)

param: $inputStr
param: $start start index, must be large than 0
param: $length. if $length <0, return all text begin from $start
param: $ignore_error whether ignore the invalid characters (in return string, these invalid chars will be replaced with '?') or not. default is true (ignore)
return: the substring, or false (empty string '')

utf8_strlen($inputStr, $ignore_error = true)   X-Ref
int utf8_strlen(string $inputString, bool $ignore_invalid_utf8_char = true)

return: length of string encoded as utf8 ( how many utf8 characters )

utf8_proportion($inputStr)   X-Ref
int utf8_proportion(string $inputString)

param: $inputString
return: percentage of valid utf8 chars of $inputString



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics