<-- Previous || Up || Next -->

Reverse Characters Every Word Function
String Words Class

Public Function ReverseCharactersEveryWord( _
      ByVal vPhrase As Variant _
    , Optional ByVal vCharSeps As Variant _
    ) As Variant

Reverse the characters within every word.
Words are defined as being separated by any of the characters in vCharSeps.

Example:
    ReverseCharactersEveryWord("This is a test.") = "sihT si a .tset"
See also:
    ReverseString Function
    ReverseEveryNCharacters Function
vPhrase: String containing the phrase in which each space-separated word will have its characters reversed. Function returns Null if vPhrase is Null or cannot be fixed up to a String.

vCharSeps: String containing characters which are considered to separate words. vCharSeps defaults to space, tab, carriage return, and line feed if it is missing or Null or cannot be fixed up to a String.

Gem: To reverse the words in a string, combine this function with ReverseString as in:

    ReverseCharactersEveryWord(ReverseString(Gettysburg))

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.