mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-02-24 17:42:44 +01:00
refactor
This commit is contained in:
parent
b7ad7ea46e
commit
020bf01023
5
src/util/_impl/_sub_str_impl.scad
Normal file
5
src/util/_impl/_sub_str_impl.scad
Normal file
@ -0,0 +1,5 @@
|
||||
function _sub_str(t, begin, end) =
|
||||
begin == end ? "" : str(t[begin], _sub_str_impl(t, begin + 1, end));
|
||||
|
||||
function _sub_str_impl(t, begin, end) =
|
||||
is_undef(end) ? _sub_str(t, begin, len(t)) : _sub_str(t, begin, end);
|
@ -1,15 +1,13 @@
|
||||
/**
|
||||
* sub_str.scad
|
||||
* _sub_str_impl.scad
|
||||
*
|
||||
* @copyright Justin Lin, 2017
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib2-sub_str.html
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib2-_sub_str_impl.html
|
||||
*
|
||||
**/
|
||||
|
||||
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);
|
||||
use <_impl/_sub_str_impl.scad>;
|
||||
|
||||
function sub_str(t, begin, end) = _sub_str_impl(t, begin, end);
|
Loading…
x
Reference in New Issue
Block a user