Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>soundex() - convert a string to it's phonetic complement</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     soundex() - convert a string to it's phonetic complement
  Usage:    <string> = soundex(<string>,[<fill>])
  Params:   string <string> - the string to convert
            char <fill> - a character to use to fill trailing
            spaces if <string> does not contain four or more valid
            characters, optional, if none, then a zero ("0") is used

            It may be desirable to use a space character as the
            fill character so that you can seek on partial names
            using alltrim().

  Returns:  a string equal to the four letter phonetic complement of
            <string>, or null if no valid characters are in <string>

 ---------------------------------- Example ---------------------------------

                 use sales
                 index on soundex(banker) to banker
                 seek soundex("Bill")
                 ? found()
                 * prints .T.

                 seek soundex("Bil")
                 * prints .F.

                 index on soundex(banker," ") to banker
                 seek soundex("Bill"," ")
                 ? found()
                 * prints .T.

                 set exact off
                 seek trim(soundex("Bil"," "))
                 * prints .T."

  Note:     Vowels, punctuation and white space characters are
            ignored. Therefore, ATT, A.T.T. and AT&T all return
            the same phonetic code.


See Also: reverse()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson