substring
function, since version 1.1.5
categories: strings
substring(str, start, length)
return a substring length characters long from string str, starting at position start
parameters
- str: string - input string
- start: number - the returned string will start at the start’th position in
str, counting from zero - length: number - the returned string will have at most
lengthcharacters
return type
string
example
substring('hello there', 1, 3)
substring('hello there', 0, 5)
returns
ell
hello