explode - Splits a string by string
Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string separator.
Note: In the followings examples, the _ between the { should be removed to make it work.
in: res={_{explode("","test t2 t3");}}. out: res=["t","e","s","t"," ","t","2"," ","t","3"]. in: res={_{explode("","test t2 t3",-2);}}. out: res=["t","e","s","t"," ","t","2"," "]. in: res={_{explode("","test t2 t3",2);}}. out: res=["t","est t2 t3"]. in: res={_{explode(",","a,b,c");}}. out: res=["a","b","c"]. in: res={_{explode("t","ttest t2 t3t");}}. out: res=["","","es"," ","2 ","3",""]. in: res={_{explode("test","ttest test2 t3t");}}. out: res=["t"," ","2 t3t"].
{{ include("includes/strings.sn") }}
Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>
1.0 2014-09-09 21:24:14 laplante@sednove.com
Edit© 2024 extenso Inc. All rights reserved.