Core Function Metaphone
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> Metaphone( <string>, <phonemes> ) </pre> === Description === Calculate the metaphone key of a string. === Parameters === ==== string ==== The input string. ==== phon...")
Newer edit →
(Created page with "<pre> Metaphone( <string>, <phonemes> ) </pre> === Description === Calculate the metaphone key of a string. === Parameters === ==== string ==== The input string. ==== phon...")
Newer edit →
Revision as of 09:01, 20 September 2013
Metaphone( <string>, <phonemes> )
Contents |
Description
Calculate the metaphone key of a string.
Parameters
string
The input string.
phonemes
Optional; This parameter restricts the returned metaphone key to phonemes characters in length.
The default value of 0 means no restriction.
Return Value
Success: Returns the metaphone key as a string.
Failure: Returns empty string.
Remarks
None.
Example
echo Metaphone("programming"); // PRKRMNK echo("\n"); echo Metaphone("programmer"); // PRKRMR echo("\n"); echo metaphone('programming', 5); // PRKRM echo("\n"); echo metaphone('programmer', 5); // PRKRM