mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-02-24 01:22:27 +01:00
sub_str can handle undef
This commit is contained in:
parent
0eb1387f27
commit
8a5956e852
@ -9,14 +9,13 @@
|
||||
**/
|
||||
|
||||
function _split_t_by(idxs, t) =
|
||||
let(end_i = len(idxs) - 1)
|
||||
let(leng = len(idxs))
|
||||
concat(
|
||||
[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[end_i] + 1)
|
||||
]
|
||||
);
|
||||
|
||||
function split_str(t, delimiter) =
|
||||
|
Loading…
x
Reference in New Issue
Block a user