13.15 The string type
append(
)
The append(
) method appends the string
to the end of a string.
beginsWith(
)
The beginsWith(
) method returns a boolean indicating whether a string begins with the substring
.
endsWith(
)
The endsWith(
) method returns a boolean indicating whether a string ends with the substring
.
find(
)
The find(
) method returns the position of the first occurrence of
in a string, or
if it is not found.
findAll(
)
The findAll(
) method returns a list of the positions where the substring
occurs in a string.
isalnum()
The isalnum() method returns a boolean indicating whether all of the characters of a string are alphanumeric.
isalpha()
The isalpha() method returns a boolean indicating whether all of the characters of a string are alphabetic.
isdigit()
The isdigit() method returns a boolean indicating whether all of the characters of a string are numeric.
len()
The len() method returns the length of a string.
lower()
The lower() method converts a string to lowercase.
lstrip()
The lstrip() method strips whitespace off the beginning of a string.
split()
The split() method returns a list of all the whitespace-separated words in a string.
splitOn(...)
The splitOn(...) method splits a string whenever it encounters any of the substrings supplied as arguments, and returns a list of the split string segments.
strip()
The strip() method strips whitespace off the beginning and end of a string.
rstrip()
The rstrip() method strips whitespace off the end of a string.
upper()
The upper() method converts a string to uppercase.