Difference between revisions of "NXSL:SplitString"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ Split string into array of strings at given separator. '''Since:''' 2.0.3 == Syntax == SplitString(''string'', ''separator''); == Parameters == :{| |- | ''str...")
 
m (Text replacement - "^" to "{{deprecated}}")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
{{deprecated}}__NOTOC__
Split string into array of strings at given separator.
Split string into array of strings at given separator.


Line 12: Line 12:
== Parameters ==
== Parameters ==


:{|
:{| class="wikitable"
|-
|-
| ''string'' || String to split.
| ''string'' || String to split.
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")

Latest revision as of 18:13, 13 September 2022

This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide)

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")