Split-String
Command Description
Split a string into an array using a specific separator
Command Prototype
arrRet = Split(sText,sSeparator)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sText | True | string | "" | The string to be operated on |
sSeparator | True | string | " | " |
return
arrRet,The variable used to save the output of the command.
Demo
TracePrint("----------------------Split string---------------------- --")
//-------------------------------------------------------------------------------
//[Remarks] Use a specific delimiter to split the string into an array.
//Input parameter 1:
// sText--the string to be processed.
//Input parameter 2:
// sSeparator--The separator used to split strings.
//out parameters:
// arrRet--The variable to which the output of the function call is saved.
//
//Command prototype: arrRet=Split(sText,sSeparator)
//-------------------------------------------------------------------------------
arrRet = Split ("111,222,333", ",")
TracePrint(arrRet)