Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_StringCaseSensitiveString Functions

Public Function SplitArray (
s_arr() As String,
RemoveEmptyResults As Boolean,
PrependDelimToResults As Boolean,
Delim As String
) As String()

Take a string array and split each element on the passed delimiter, then pass back all the results as a string array.

s_arr() as String

The string array to split

RemoveEmptyResults as Boolean

Don't add empty elements to the array (if the string is empty, the array will be memberless)

PrependDelimToResults as Boolean

Add the delimiter back to the front of the array element (so we can tell which delimiter was used)

Delim as String

The splitting delimiter

Call Template:

Dim s() As String
s = xf.StrCS.SplitArray(s_arr, RemoveEmptyResults, PrependDelimToResults, Delim)

See Also:

Example 1:

Dim m_arr() As String
ReDim m_arr(2) As String
m_arr(1) = "1+1"
m_arr(2) = "3+6"
m_arr = xf.str.SplitArray(m_arr, False, False, "+")   => m_arr = ("1", "1", "3", "6")
m_arr = xf.str.SplitArray(m_arr, False, True, "+")    => m_arr = ("1", "+1", "3", "+6")
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd