ReferenceScript nodesUtilities › Text
Mid
Count letters from start (0 is the first).
ƒMid
Source TextHelloResult
Start0
Count3
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
Source Texttext | text | "Hello" | – |
Startstart | int | 0 | – |
Countcount | int | 3 | – |
Outputs
| Pin | Type |
|---|---|
Resultout | text |
The code it becomes
The graph below written as a script would write it.
// On Scene Startscene.log((String("Hello").substr(Math.max(0, 0), Math.max(0, 3))));In a graph
◆On Scene Start
ƒMid
Source TextHelloResult
Start0
Count3
ƒPrint
In Text
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.