string
option
arg
...Perform string operations on one or more strings, based
on the value of option
. String
indices start at 0.
string1
string2
Compare strings lexicographically. Return −1 if
string1
is less than
string2
, 0 if equal, or 1 if
greater.
string1
string2
Return the index of the first occurrence of
string1
in
string2
, or −1 if no match.
string
charIndex
Return the character in
string
that has index
charIndex
. Return empty string if
charIndex
is out of range.
string1
string2
Return the index of the last occurrence of
string1
in
string2
, or −1 if no match.
string
Return the length of string
in characters.
pattern
string
Return 1 if string
matches
glob pattern pattern
; otherwise,
return 0.
string
first last
Return substring of string
consisting of characters from index
first
through last.
Last
can be the string “end”.
string
Return string
converted to
lowercase.
string
Return string
converted to
uppercase.
string
[chars
]Return string
with leading
and trailing characters from the set
chars
removed (default is
whitespace characters).
string
[chars
]Return string
with leading
characters from the set chars
removed (default is whitespace characters).
string
[chars
]Return string
with trailing
characters from the set chars
removed (default is whitespace characters).
string
index
Return index of first character after word in
string
that occurs at character
position index
.
string
index
Return index of first character of word in
string
that occurs at character
position index
.