Difference between revisions of "NXSL:SplitString"

From NetXMS Wiki
Jump to navigation Jump to search
Line 27: Line 27:
== Examples ==
== Examples ==


  format("a;b;c;d", ";") -> %("a", "b", "c", "d")
  SplitString("a;b;c;d", ";") -> %("a", "b", "c", "d")
  format("abcd", ";") -> %("abcd")
  SplitString("abcd", ";") -> %("abcd")

Revision as of 21:30, 7 November 2018

Split string into array of strings at given separator.

Since: 2.0.3


Syntax

SplitString(string, separator);


Parameters

string String to split.
separator Separator character. If supplied string is longer than 1 character, it's first character will be used as separator.


Return Value

Array of strings.


Examples

SplitString("a;b;c;d", ";")		->	%("a", "b", "c", "d")
SplitString("abcd", ";")		->	%("abcd")