RPTools

Personal tools
From MapToolDoc

stringToList

stringToList() Function

Introduced in version 1.3b48

Converts a string into a string list using a pattern to determine separator between elements. The specified delimiter is used to separate the elements in the Macros:string list if it is specified, otherwise the default value of "," is used. Pattern can be a regular expression.

Usage

  1. stringToList(str, pattern)
  1. stringToList(str, pattern, delim)

Examples

  1.     [stringToList("This is a test", " ")]
  2.     [stringToList("1,2,3,4", ",", ":")]

Returns

   This,is,a,test
   1:2:3:4