String
API documention for the Prototype String.
Prototype for the primitive string type.
Source code
Usage
var instance = new String(args);
...
instance.method(args);
Index
Constructor
Variables
-- No Variables --
Getters & Setters


Static
Returns an empty string.
Type: string
Usage: var empty = String.empty;

Gets the amount of characters in the string.
Type: int
Usage: var length = s.length;
Methods

Returns a character within the string.

Concatenates multiple strings to this string.

Returns whether the string ends with another string.

Returns whether the string contains another string.

Returns the index of the first occurrence of a string within this string.

Returns the index of the last occurrence of a string within this string.

Pads the end of the string until the string reaches a certain length.
Signatures:
Return: string
Arguments: int targetLength, string padStr
Usage: var result = s.padEnd(targetLength, padStr);

Pads the start of the string until the string reaches a certain length.
Signatures:
Return: string
Arguments: int targetLength, string padStr
Usage: var result = s.padStart(targetLength, padStr);

Removes a set of characters from the string.
Return: string
Arguments: int startIndex, [int length]
Usage: var result = s.remove(startIndex, [length]);

Repeats the string a number of times.

Replaces parts within the string with another string.

Returns a slice of the string.
Signatures:

Splits the string at a delimiter.
Signatures:
Return: string[]
Arguments: string[] delimiters, [int limit]
Usage: var result = s.split(delimiters, [limit]);
Return: string[]
Arguments: string delimiter, [int limit]
Usage: var result = s.split(delimiter, [limit]);

Returns whether the string starts with another string.

Converts all alphabetic characters in the string to their lower case counterparts.
Return: string
Usage: var result = s.toLower();

Converts all alphabetic characters in the string to their upper case counterparts.
Return: string
Usage: var result = s.toUpper();

Trims characters from the start and end of the string.
Signatures:
Return: string
Usage: var result = s.trim();

Trims characters from the end of the string.
Signatures:
Return: string
Usage: var result = s.trimEnd();

Trims characters from the start of the string.
Signatures:
Return: string
Usage: var result = s.trimStart();
Indexers
-- No Indexers --