split()

split() converts a string to an array, dividing the string into the array elements specified by the separator character. This method accepts one parameter which is any symbol to be inserted between the values of the elements in the dynamic array.

Syntax:

str.split()

str.split("|")

Usage example:

str.split()

FUNCTION split_string()
	DEFINE string_value STRING
	DEFINE array_value DYNAMIC ARRAY OF STRING
	LET string_value="AA|BB|CC|DD"
	LET array_value = string_value.split()
	DISPLAY array_value
END FUNCTION

str.split("|")

FUNCTION split_string()
	DEFINE string_value STRING
	DEFINE array_value DYNAMIC ARRAY OF STRING
	LET string_value="AA,BB,CC,DD"
	LET array_value = string_value.split(",")
	DISPLAY array_value
END FUNCTION

 

Contact Us

Privacy Policy

Copyright © 2026 Querix, (UK) Ltd.