位置: 编程技术 - 正文
推荐整理分享PHP:mb_convert_kana()的用法_mbstring函数,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 4 >= 4.0.6, PHP 5)
mb_convert_kana — Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
说明 string mb_convert_kana ( string $str [, string $option = "KV" [, string $encoding = mb_internal_encoding() ]] )Performs a "han-kaku" - "zen-kaku" conversion for string str. This function is only useful for Japanese.
参数str
The string being converted.
optionThe conversion option.
Specify with a combination of following options. Applicable Conversion Options Option Meaning r Convert "zen-kaku" alphabets to "han-kaku" R Convert "han-kaku" alphabets to "zen-kaku" n Convert "zen-kaku" numbers to "han-kaku" N Convert "han-kaku" numbers to "zen-kaku" a Convert "zen-kaku" alphabets and numbers to "han-kaku" A Convert "han-kaku" alphabets and numbers to "zen-kaku" (Characters included in "a", "A" options are U+ - U+E excluding U+, U+, U+C, U+E) s Convert "zen-kaku" space to "han-kaku" (U+ -> U+) S Convert "han-kaku" space to "zen-kaku" (U+ -> U+) k Convert "zen-kaku kata-kana" to "han-kaku kata-kana" K Convert "han-kaku kata-kana" to "zen-kaku kata-kana" h Convert "zen-kaku hira-gana" to "han-kaku kata-kana" H Convert "han-kaku kata-kana" to "zen-kaku hira-gana" c Convert "zen-kaku kata-kana" to "zen-kaku hira-gana" C Convert "zen-kaku hira-gana" to "zen-kaku kata-kana" V Collapse voiced sound notation and convert them into a character. Use with "K","H"
encodingencoding参数为字符编码。如果省略,则使用内部字符编码。
返回值The converted string.
范例
Example #1 mb_convert_kana() example
<?php/*Convertall"kana"to"zen-kaku""kata-kana"*/$str=mb_convert_kana($str,"KVC");/*Convert"han-kaku""kata-kana"to"zen-kaku""kata-kana"and"zen-kaku"alpha-numericto"han-kaku"*/$str=mb_convert_kana($str,"KVa");?>PHP:mb_convert_case()的用法_mbstring函数 mb_convert_case(PHP4=4.3.0,PHP5)mb_convert_case对字符串进行大小写转换说明stringmb_convert_case(string$str,int$mode[,string$encoding=mb_internal_encoding()])对一个string进行大小写
PHP:mb_check_encoding()的用法_mbstring函数 mb_check_encoding(PHP4=4.4.3,PHP5=5.1.3)mb_check_encoding检查字符串在指定的编码里是否有效说明boolmb_check_encoding([string$var=NULL[,string$encoding=mb_internal_encoding()]])检查
PHP字符串函数substr()的用法 substr(PHP4,PHP5)substr返回字符串的子串说明stringsubstr(string$string,int$start[,int$length])返回字符串string由start和length参数指定的子字符串。参数string输入字符串
标签: PHP:mb_convert_kana()的用法_mbstring函数
本文链接地址:https://www.jiuchutong.com/biancheng/278786.html 转载请保留说明!友情链接: 武汉网站建设