Strings.skip()

Syntax

function skip(string: string, count: number): string

Skips the first count characters in the string and returns the rest.

Parameters
string

The string to take characters from.

count

The number of characters to skip over.

Example

import { Strings } from 'potence';

const string = '123456789';

Strings.skip(string, 5);  // -> "6789"

Remarks

If string is shorter than count, this function skips over the entire string and returns an empty string.

If count is negative, this function skips from the end of the string instead (see Strings.skipLast(), which provides the same functionality).

Contrast Strings.take(). Compare Strings.skipUntil().