Public Function MidReverse( _ ByVal vString As Variant _ , ByVal vPos As Variant _ , Optional ByVal vLength As Variant _ ) As Variant
MidReverse("123456789", 4) = MidReverse("123456789", 4, 4) = "4321" ' #1 MidReverse("123456789", 6, 4) = "6543" whereas Mid$("123456789", 6, 4) = "6789"See also:
MidString Function Mid$ Function (Visual Basic)vString: The string from which a portion is to be extracted. Function returns Null if vString is Null or cannot be fixed up to a String.
vPos: The starting character position within vString. vPos defaults to the last position within vString if it is Null or cannot be fixed up to a number.
Function returns an empty string if vPos is <= 0 (less than or equal to zero).
Function returns an empty string if vPos is beyond the end of vString.
vLength: The number of characters which are to be extracted from vString. vLength defaults to the starting position (vPos) if it is missing or Null or cannot be fixed up to a number, as in example #1.
Function returns an empty string if vLength is <= 0 (less than or equal to zero).
vLength defaults to the starting position (vPos) if it is greater than vPos.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.