mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-02-21 08:02:24 +01:00
17 lines
483 B
Markdown
17 lines
483 B
Markdown
# 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 the original string.
|
|
|
|
## Examples
|
|
|
|
include <sub_str.scad>;
|
|
|
|
echo(sub_str("helloworld", 0, 5)); // ECHO: "hello"
|
|
echo(sub_str("helloworld", 5)); // ECHO: "world"
|