位置: 编程技术 - 正文
推荐整理分享PHP字符串函数soundex()的用法(php字符串操作函数),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:php字符串包含某个字符串,php字符串定义的三种方式,php字符串包含某个字符串,php 字符串函数,php字符串包含某个字符串,php字符串型数据的定义方式,php字符串定义的三种方式,php 字符串函数,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 4, PHP 5)
soundex — Calculate the soundex key of a string
说明 string soundex ( string $str )Calculates the soundex key of str.
Soundex keys have the property that words pronounced similarly produce the same soundex key, and can thus be used to simplify searches in databases where you know the pronunciation but not the spelling. This soundex function returns a string 4 characters long, starting with a letter.
This particular soundex function is one described by Donald Knuth in "The Art Of Computer Programming, vol. 3: Sorting And Searching", Addison-Wesley (), pp. -.
参数str
The input string.
返回值Returns the soundex key as a string.
范例
Example #1 Soundex Examples
<?phpsoundex("Euler")==soundex("Ellery");//Esoundex("Gauss")==soundex("Ghosh");//Gsoundex("Hilbert")==soundex("Heilbronn");//Hsoundex("Knuth")==soundex("Kant");//Ksoundex("Lloyd")==soundex("Ladd");//Lsoundex("Lukasiewicz")==soundex("Lissajous");//L?> 参见levenshtein() - 计算两个字符串之间的编辑距离 metaphone() - Calculate the metaphone key of a string similar_text() - 计算两个字符串的相似度
PHP字符串函数similar_text()的用法 similar_text(PHP4,PHP5)similar_text计算两个字符串的相似度说明intsimilar_text(string$first,string$second[,float&$percent])两个字符串的相似程度计算依据ProgrammingClassics:Impl
PHP字符串函数setlocale()的用法 setlocale(PHP4,PHP5)setlocaleSetlocaleinformation说明stringsetlocale(int$category,string$locale[,string$...])stringsetlocale(int$category,array$locale)Setslocaleinformation.参数categorycategoryisa
PHP字符串函数sha1_file()的用法 sha1_file(PHP4=4.3.0,PHP5)sha1_file计算文件的sha1散列值说明stringsha1_file(string$filename[,bool$raw_output=false])利用美国安全散列算法1,计算并返回由filename指定的文件
标签: php字符串操作函数
本文链接地址:https://www.jiuchutong.com/biancheng/278839.html 转载请保留说明!友情链接: 武汉网站建设