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

Remove Some Vowels Function
Codes Ciphers Class

Public Function RemoveSomeVowels( _
      ByVal vValue As Variant _
    , Optional ByVal vRetainRatio As Variant _
    ) As Variant

Removes some characters representing vowels from the words in a string.

Summary: Vowels consist of the characters "A", "E", "I", "O", "U", plus certain accented "foreign" characters.
Vowels will be removed from each word as long as the ratio of the word length without vowels to the word length with vowels is greater than or equal to vRetainRatio.
Example:
    RemoveSomeVowels("This is only a test.") = "Ths is nly a tst."
See also:
    RemoveVowels Function
    RemoveSomeCharacters Function
    CharacterTypes Class
       IsVowel Function
vValue: String containing the phrase which is to have some of its vowels removed. Function returns Null if vValue is Null or cannot be fixed up to a String.

vRetainRatio: Ratio of the word length without vowels to the word length with vowels under which vowels will be retained. The minimum acceptable ratio of the new word length of the old word length. vRetainRatio defaults to .6 (60%) if it is missing or Null or cannot be fixed up to a number.

Note: Function uses the built-in character classification routines to determine which characters represent vowels.

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