It represents a series of characters.

PUBLIC METHODS

Integer length()

Return  
Integer Number of characters.

String replace(String objetivo, String nuevoValor)

It looks for the objective chain in the string value. If it is found, it replaces all the occurrences with the new value and it returns the resulting string of the operation.

Arguments  
objective String you wish to replace.
nuevoValor Replacement String.
Retun  
String New string resulting from the replacement.

String substringToIndex(Integer indice)

It returns a substring of the string. It runs all the character chain from the beginning to the index previous to the one indicated in the parameter and returns a new string.

Arguments  
index Integer: limit index to determine a substring.
Return  
String Resulting Substring.
Exceptions
OutOfBoundIndexError – Index greater than the number of the characters of the string.

String substringFromIndex(Integer indice)

It returns a substring of the string. It goes through the character chain from the indicated index to the end and returns a new string.

Arguments  
index Integer: starting index to determine the substring, including it.
Return  
String Resulting Substring.
Exceptions
OutOfBoundIndexError – Index greater than the number of characters of the string.

String charAt(Integer indice)

It returns a substring with only one character of the string. It goes through the characters from the indicated index and returns a new string that contains only the character of this index.

Arguments  
index Integer: index of the desired character.
Return  
String Resulting Substring.

Integer indexOf(String subString)

It returns the index of the first occurrence found of the substring

Arguments  
subString String: substring you wish to look for.
Return  
Integer Index of the first occurrence of the substring or -1 if it was not found.

Integer lastIndexOf(String subString)

It returns the index of the first occurrence found of the substring. D

Arguments  
subString String: substring you wish to look for.
Return  
Integer Index of the first occurrence of the substring or -1 if it was not found.

String capitalize()

It replaces the first character of each word of the string with its equivalent in capital letter and returns the resulting string.

Return  
String Resulting String.

String toLowerCase()

It replaces all the characters of the string with its equivalent in lower case and returns the resulting string.

Return  
String Resulting String.

String toUpperCase()

It replaces the first character of each word of the string with its equivalent in capital letter and returns the resulting string.

Return  
String Resulting String.

Boolean isAlpha()

It checks that all the characters of the string are letters (a-z-A-Z). If a character is not a letter, it returns false. Otherwise, it returns true.

Return  
Boolean True if all the characters are letters. Otherwise, it is false.

Boolean isAlphaNumeric()

It checks that all the characters of the string are letters (a-z-A-Z) or numbers (0-9). If a character is not a letter or a number, it returns false. Otherwise, it returns true.

Return  
Boolean True is the string just contains letters and/or numbers. It is false if it contains something different.

String trim()

It removes from both extremes all the characters of the string that are blank spaces and returns a resulting string.

Return  
String Resulting string without blank spaces.

Array<String> split(String subString)

It divides the value of the string using the parameter substring as a divider. It returns an array with a resulting character chain. The parameter is only used as divider and it is not returned as part of the result chain.

Arguments  
subString String: value to use as divider.
Return  
Array<String> . Collection with strings resulting from the division.

String reverse()

It runs all the characters and changes the indexes in reverse order.

Return  
String Resulting String.