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

Split Strings Function
String Manipulations Class

Public Function SplitStrings( _
      ByRef rOddPosChars As Variant _
    , ByRef rEvenPosChars As Variant _
    , ByVal vValue As Variant _
    ) As Boolean

Takes the characters in odd-numbered positions within string vValue and places them within rOddPosChars and takes the characters in even-numbered positions within vValue and places then within rEvenPosChars.

Example:
       Dim strOdd As String
       Dim strEvn As String
       SplitStrings(strOdd, strEvn, "123456789")
    is more efficient than
       strOdd = CharacterEveryNthCharacter("123456789", 1, 2)
       strEvn = CharacterEveryNthCharacter("123456789", 2, 2)
    After these examples
       strOdd = "13579"
       strEvn = "2468"
See also:
    MergeStrings Function
    CharacterEveryNthCharacter Function
    SplitStringsSample Subroutine
rOddPosChars: The String or Variant which is to receive the vValue characters in odd-numbered positions.
rEvenPosChars: The String or Variant which is to receive the vValue characters in even-numbered positions.
vValue: The string whose odd- and even-positioned characters are to be assigned to separate strings. Function returns False if vValue is Null or cannot be fixed up to a String.

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