string trim string ?chars?
Returns a value identical to string
except that any leading or trailing character that
appear in chars are removed,
chars defaults to the white space
characters (space, tab, newline, and carriage return).
string trimleft string ?chars?
Same as string trim except that only leading
characters are removed.
string trimright string ?chars?
Same as string trim except that only trailing
characters are removed.
string tolower string
Returns a value identical to string
except that all uppercase characters have been
converted to lowercase.
string toupper string
string
except that all lowercase characters have been
converted to uppercase.
string first string1 string2
Returns the index in string2 of the
first character in the leftmost substring that exactly
matches string1, or -1 if there
is no match.
string last string1 string2
Returns the index in string2 of the
first character in the rightmost substring that exactly
matches string1, or -1 if there
is no match.
string index string charIndex
Returns the charIndex'th character of
string, or an empty string if there is
no such character. The first character in
string has index 0.
string length string
Returns the number of characters in string.
string range string first last
Returns the substring of string that
lies between the indeices given by first
and last, inclusive. An index of 0
refers to the first character in the string, and
last may be end to refer to the
last character of the string.
format formatString ?value value ...?
Returns a result equal to formatString
except that the value arguments have
been substituted in place of % sequences in
formatString.
scan string format varname ?varName varName ...?
Parses fields from string as specified
by format and places the values that
match % sequences into variable named by the
varName arguments. Returns the number of
fields successfully parsed.
regexp ?-indices? ?-nocase? ?--? exp string ?matchVar? ?subVar subVar ...?
Determines whether the regular expression exp
matches part of all of string and returns
1 it id does, 0 if it doesn't. If
there is a match, information about matching range(s)
is placed in the variables named by matchVar
and the subVar's, if they are specified.
regsub ?-all? ?-nocase? ?--? exp string subSpec varName
Matches exp against string
as for regexp and returns 1 if there
is a match, 0 if there is none. Also copies
string into the variable named by
varName, making substitutions for
the matching portions(s) as specified by
subSpec
string compare string1 string2
Returns -1, 0, or 1 if
string1 is lexicographically less then,
equal to, or greater than string2.
string match pattern string
Returns 1 if pattern matches
string using glob-style matching rules
(*, ?, [], and \)
and 0 if it doesn't.