Syntax
SLICE(text, start_index, [length])
Usage examples
Example 1
Input | 1 { 2 "my_action": { 3 "message": "hello world" 4 } 5 } |
Formula | SLICE(my_action.message, 6) |
Output | "w" |
Example 2
Input | 1 { 2 "my_action": { 3 "message": "hello world" 4 } 5 } |
Formula | SLICE(my_action.message, 6, 5) |
Output | "world" |
Example 3
If length
extends past the end of the piece of text, it returns only the remainder of the text:
Input | 1 { 2 "my_action": { 3 "message": "hello world" 4 } 5 } |
Formula | SLICE(my_action.message, 6, 50) |
Output | "world" |
Example 4
start_index
can be specified as a negative number to count back from the end of the piece of text:
Input | 1 { 2 "my_action": { 3 "message": "hello world" 4 } 5 } |
Formula | SLICE(my_action.message, -5, 5) |
Output | "world" |
Sample Actions
Event Transform
My Action
Event Transform
SLICE
Event Transform
SLICE
Event Transform
SLICE
Event Transform
SLICE
Select an Action to inspect.
You can also click "Copy Actions" and paste them in your Tines Story to see how they work.