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

(get) emptyStatic
Returns an empty string.
Type: stringUsage: var empty = String.empty;
(get) lengthGets the amount of characters in the string.
Type: intUsage: var length = s.length;Methods
charAtReturns a character within the string.
concatConcatenates multiple strings to this string.
endsWithReturns whether the string ends with another string.
includesReturns whether the string contains another string.
indexOfReturns the index of the first occurrence of a string within this string.
lastIndexOfReturns the index of the last occurrence of a string within this string.
padEndPads the end of the string until the string reaches a certain length.
Signatures:
Return: stringArguments: int targetLength, string padStrUsage: var result = s.padEnd(targetLength, padStr);
padStartPads the start of the string until the string reaches a certain length.
Signatures:
Return: stringArguments: int targetLength, string padStrUsage: var result = s.padStart(targetLength, padStr);
removeRemoves a set of characters from the string.
Return: stringArguments: int startIndex, [int length]Usage: var result = s.remove(startIndex, [length]);
repeatRepeats the string a number of times.
replaceReplaces parts within the string with another string.
sliceReturns a slice of the string.
Signatures:
splitSplits 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]);
startsWithReturns whether the string starts with another string.
toLowerConverts all alphabetic characters in the string to their lower case counterparts.
Return: stringUsage: var result = s.toLower();
toUpperConverts all alphabetic characters in the string to their upper case counterparts.
Return: stringUsage: var result = s.toUpper();
trimTrims characters from the start and end of the string.
Signatures:
Return: stringUsage: var result = s.trim();
trimEndTrims characters from the end of the string.
Signatures:
Return: stringUsage: var result = s.trimEnd();
trimStartTrims characters from the start of the string.
Signatures:
Return: stringUsage: var result = s.trimStart();Indexers
-- No Indexers --
Pokemon3D Script API Documentation
Articles