array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.mb-strwidth.php', 1 => 'mb_strwidth', ), 'up' => array ( 0 => 'ref.mbstring.php', 1 => 'Funciones de cadenas de caracteres multibyte', ), 'prev' => array ( 0 => 'function.mb-strtoupper.php', 1 => 'mb_strtoupper', ), 'next' => array ( 0 => 'function.mb-substitute-character.php', 1 => 'mb_substitute_character', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'es', 'path' => 'reference/mbstring/functions/mb-strwidth.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)
mb_strwidth — Devuelve el ancho de un string
Devuelve el ancho del string str
.
Los caracteres multibyte normalmente son el doble de anchos que los caracteres de un único byte.
Caracteres | Ancho |
---|---|
U+0000 - U+0019 | 0 |
U+0020 - U+1FFF | 1 |
U+2000 - U+FF60 | 2 |
U+FF61 - U+FF9F | 1 |
U+FFA0 - | 2 |
str
El string a decodificar.
encoding
El parámetro encoding
es la codificación de caracteres. Si es omitido, será usado el valor de la
codificación de caracteres interna.
El ancho del string str
.