1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 13:01:37 +02:00
This commit is contained in:
Justin Lin
2019-06-24 18:02:24 +08:00
parent 5f3bfb391d
commit 53a69477d6

View File

@@ -8,8 +8,8 @@
*
**/
function sub_str(t, begin, end, result = "") =
is_undef(end) ? sub_str(t, begin, len(t)) : (
begin == end ? result : sub_str(t, begin + 1, end, str(result, t[begin]))
);
function _sub_str(t, begin, end) =
begin == end ? "" : str(t[begin], sub_str(t, begin + 1, end));
function sub_str(t, begin, end) =
is_undef(end) ? _sub_str(t, begin, len(t)) : _sub_str(t, begin, end);