Function String Words Class

PigLatin

Converts an English phrase into "Pig Latin." The first letter of every word is moved to the end of the word then an "a" is added.

Signature (Visual Basic / VBA)

Public Function PigLatin( _
    ByVal vPhrase As Variant _
    ) As Variant

Code Example

    PigLatin("go away") = "oga wayaa"
    PigLatin("This is a test.") = "hisTa sia aa estta.")
    PigLatin(Panama) = "aA anma, aa lanpa, aa analca, anamaPa."

Parameters

Parameter Description
vPhrase The string containing the English-language phrase which is to be translated into "Pig Latin." Function returns Null if vPhrase is Null of cannot be fixed up to a String.

Notes & Version History

Note This function's handling of capitalization is not too good.
Note Function uses the built-in character classification routines to determine which characters are alphanumeric.