1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00
This commit is contained in:
Justin Lin
2019-07-01 07:46:25 +08:00
parent b7d8d3e87c
commit 6bb3b445b4

View File

@@ -8,8 +8,9 @@
*
**/
function sub_str(t, begin, end, result = "") =
end == undef ? 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) =
end == undef ? _sub_str(t, begin, len(t)) : _sub_str(t, begin, end);