<- CRPL reference <- String Commands

Substring

ArgumentsResultNotation
String, Index, Length Part of String s1 n1 n2 – s2

Description

Takes a String (s1), an index (n1) and a length (n2), and returns part of s1 beginning at n1 with length n2. The index starts at zero.

Examples

# Pulls the substring "ace" out of "racecar"
"racecar" 1 3 Substring

# Warp notation version
Substring("racecar" 1 3)