mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-15 11:14:17 +02:00
sub_str can handle undef
This commit is contained in:
@@ -9,14 +9,13 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
function _split_t_by(idxs, t) =
|
function _split_t_by(idxs, t) =
|
||||||
let(end_i = len(idxs) - 1)
|
let(leng = len(idxs))
|
||||||
concat(
|
concat(
|
||||||
[sub_str(t, 0, idxs[0])],
|
[sub_str(t, 0, idxs[0])],
|
||||||
[
|
[
|
||||||
for(i = 0; i < end_i; i = i + 1)
|
for(i = 0; i < leng; i = i + 1)
|
||||||
sub_str(t, idxs[i] + 1, idxs[i + 1])
|
sub_str(t, idxs[i] + 1, idxs[i + 1])
|
||||||
],
|
]
|
||||||
sub_str(t, idxs[end_i] + 1)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
function split_str(t, delimiter) =
|
function split_str(t, delimiter) =
|
||||||
|
Reference in New Issue
Block a user