split()
Functionality¶
Splits a string into an array of substrings that are based on the characters/string provided in the input.
Syntax¶
How does it work?¶
The split(str) function returns the array of the string datatype by splitting the current string by the given substring parameter.
if the substring parameter is not present in current string datatype it will return an array with only one element with the value as the current string.
if the value does not exist or null, it will return default null.
Example¶
coffeeshop(base class) language properties
Type | Name | Value |
---|---|---|
str | name | sample coffeeshop |
str | address | b/11 sample coffeeshop, near mg road, hyderabad, telengana |
source
1 2 3 4 5 6 | <div> <!-- this will retun the array by splitting the address by comma(,) --> <ul k-repeat="System.Exception: No matching Action found for the expression. at KitsuneSyntaxParser.Models.ParseTress.Parse(Node node)"> <li></li> </ul> </div> |
output
1 2 3 4 5 6 7 8 | <div> <ul> <li>b/11 sample coffeeshop</li> <li>near mg road</li> <li>hyderabad</li> <li>telengana</li> </ul> </div> |