Version: v0.5.1 - Beta.  We welcome contributors & feedback.  THanks!

String.substring

substring(start, length=-1)

Description

Get the inner string beginning at start, and length characters.

If length is -1 (default), return the rest of the string.

'abcdef'.substring(2);
//= 'cdef'

'abcdef'.substring(3, 2);
//= 'de'

See Also