Skip to content

ProtoString skip() Method

Seth Clydesdale edited this page Jun 11, 2015 · 1 revision

<< Back to Position Methods

Example

Forming a new string by skipping through the characters.

'Seth'.skip(2); // returns 'St'
'ProtoString'.skip(5); // returns 'PSg'
'The quick brown fox jumps over the lazy dog'.skip(13); // returns 'Two '

Description

The skip method skips through the characters of a string to form a new one. The characters returned depends on the value passed to the method. Passing 1 will return the normal string, whereas passing 2 will skip a single character.

Syntax

String.skip(n);

Parameters

Parameter Description
n A number that specifies the number of characters to skip. Defaults to not skipping any if left undefined.
Clone this wiki locally