Splits an input string into a dynamic array of strings (which are assumed to be numbers but won't necessarily be). The SplitNumbers function uses the delimiters plus the special delimiters of '+' and '-' to split the string (e. g. , the string '100+99' is two numbers and is valid)
Namespace: RSSVGUtils
Delphi |
function SplitNumbers(const S, Delimiters: string): TStringDynArray; |
Parameters
S
Type: string
Delimiters
Type: string
Type: TStringDynArray
The SplitNumbers function returns an array of strings. It extends the Delphi SplitStrings function to include the delimiters but also +/- to correctly split strings like this: '1.2-3.3 1e3-4', which is 1.2, -3.3, 1e3, and -4. Note that like SplitStrings, you can receive a LOT of extra array elements that are just empty strings because of duplicated delimiters. It is advisable to call CleanArray to remove the empty elements. |
var end; |
Reference |