.. efun:: string * explode(string str, string del) Return an array of strings, created when the string str is split into substrings as divided by del. .. note:: ``implode(explode(str, del), del) == str`` is always true. .. usage:: :: function returns ------------------------------------------------------------------- explode(" ab cd ef ", " ") ({ "", "ab", "cd", "ef", "" }) explode("abc", "abc") ({ "", "" }) explode("", "") ({ "" }) explode("", ) ({ "" }) explode("abc", "xyz") ({ "abc" }) explode("abc", "") ({ "a", "b", "c" }) .. todo:: not sure what to do with formats like this; retain as table? :history unknown changed: ``explode(" ab cd ef ", " ")`` formerly returned ``({ "ab", "cd", "ef" })`` instead of ``({ "", "ab", "cd", "ef", "" })``, i. e. the empty strings were ignored. The new behaviour is more consistent, because now ``implode(explode(str, del), del) == str`` is always true. :history 3.5.0 changed: explode("","") returns ({""}), so it is guaranteed to return a non-empty array. .. seealso:: :efun:`sscanf`, :efun:`implode`, :efun:`regexplode`