AfxStrSplitfunction
Splits a string into tokens.
Syntax
FUNCTION AfxStrSplit (BYREF wszStr AS CONST WSTRING, BYREF wszDelimiters AS WSTRING = " ") AS DSAFEARRAY
Parameters
| Name | Description | |
|---|---|---|
wszStr | The string to split. | |
wszDelimiters | The delimiter characters. |
Return value
A DSAFEARRAY containing a token in each element.
Description
Splits a string into tokens, which are sequences of contiguous characters separated by any of the characters that are part of delimiters.
Example
DIM dws AS DWSTRING = "- This, a sample string." DIM dsa AS DSAFEARRAY = AfxStrSplit(dws, " ,.-") FOR i AS LONG = dsa.LBound TO dsa.UBound PRINT dsa.GetStr(i) NEXT
Reference
- Include file
DSafeArray.inc - Defined in AfxNova/DSafeArray.inc:2194
- Documented in COM/DSAFEARRAY Class.md
- Topic: DSAFEARRAY Class