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

Mid String Function
String Manipulations Class

Public Function MidString( _
      ByVal vString As Variant _
    , Optional ByVal vStart As Variant _
    , Optional ByVal vLength As Variant _
    ) As Variant

"Middle String"
Like the Visual Basic Mid function, except that the vStart can be negative.

Example:
       MidString("123456789", -1, 5) = "123"
    which is the same as
       Mid("123456789", 1, 3)
See also:
    MidReverse 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.

vStart: The starting character position within vString. vStart defaults to 1 (one) if it is missing or Null or cannot be fixed up to a number.

vLength: The number of characters which are to be extracted from vString. Function returns the portion of vString from position vStart through the end of the string when vLength is missing or Null or cannot be fixed up to a number.

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