Public Function StripRangeOfCharacters( _ ByVal vValue As Variant _ , ByVal vFromAsc As Variant _ , ByVal vThruAsc As Variant _ ) As Variant
StripRangeOfCharacters("123 ABC 123", 0, 64) = "ABC" StripRangeOfCharacters("123 ABC 123", Chr$(0), "@") = "ABC"See also:
StripCharacters Function DifferenceCharacters Function EveryCharacterWithinRange Function KeepRangeOfCharacters FunctionvValue: String containing the characters which will be copied to the result string unless their ASCII value is within the specified range. Function returns Null if vValue is Null or cannot be fixed up to a String.
vFromAsc: String character or numeric ASCII value describing the lower bound of the range of characters to be removed from string vValue. Note: Special argument fix-up code.
If vFromAsc is an empty string, then vValue is returned unchanged.
If vFromAsc is a non-empty string, then the ASCII value of its first character is used as the lower bound.
If vFromAsc is numeric (and not a numeric string), then that ASCII value will be used as the lower bound.
Function returns vValue unchanged if vFromAsc is not string nor numeric.
vThruAsc: String character or numeric ASCII value describing the upper bound of the range of characters to be removed from string vValue. Note: Special argument fix-up code.
If vThruAsc is an empty string, then vValue is returned unchanged.
If vThruAsc is a non-empty string, then the ASCII value of its first character is used as the upper bound.
If vThruAsc is numeric (and not a numeric string), then that ASCII value will be used as the upper bound.
Function returns vValue unchanged if vThruAsc is not string nor numeric.
Function returns an empty string if vFromAsc is greater than vThruAsc.
Note: Function uses the ASCII value of characters to determine if they fall within the range, which is in effect the same as using Binary comparisons.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.