Public Function StringEveryNthCharRepeated( _ ByVal vString As Variant _ , Optional ByVal vStep As Variant _ , Optional ByVal vTruncate As Variant _ ) As Variant
StringEveryNthCharRepeated("123456789", 2, False) = "135792468" StringEveryNthCharRepeated("1234567890", 3, False) = "1470258369" StringEveryNthCharRepeated("123456789", 2, True) = "13579" ' #3 StringEveryNthCharRepeated("1234567890", 3, True) = "14702583" ' #4See also:
StringEveryNthCharacter Function SeparateCharactersIntoNGroups FunctionvString: The string whose characters are to be rearranged. Function returns Null if vString is Null or cannot be fixed up to a String.
vStep: The number of character positions to move after extracting each character. vStep defaults to 1 (one) if it is missing or Null or cannot be fixed up to a number.
Function returns an empty string if the step is <= 0 (less than or equal to zero).
vTruncate: Determines whether the last sub-string is truncated or included within the result. vTruncate defaults to False if it is missing or Null or cannot be fixed up to a number, as in examples #3 and #4.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.