1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-31 18:22:08 +02:00

added sub_str

This commit is contained in:
Justin Lin
2017-03-29 11:35:41 +08:00
parent 1eb7daaf08
commit c8193baa20
3 changed files with 33 additions and 1 deletions

14
docs/lib-sub_str.md Normal file
View File

@@ -0,0 +1,14 @@
# sub_str
Returns a new string that is a substring of the given string.
## Parameters
- `t` : The original string.
- `begin` : The beginning index, inclusive.
- `end` : The ending index, exclusive. If it's omitted, the substring begins with the character at the specified `begin` and extends to the end of this string.
## Examples
echo(sub_str("helloworld", 0, 5)); // ECHO: "hello"
echo(sub_str("helloworld", 5)); // ECHO: "world"