"chop" (string::chop)

Removes n characters from the end of the string.

Synopsis

int string.chop(int n);

Parameters

Parameter Description
n Number of characters

Description

Removes n characters from the end of the string.

If n is greater than or equal to length(), the result is an empty string; if n is negative, it is equivalent to passing zero.

Always returns 0.

Assignment

String