| |
- capwords(str, pat='[^a-zA-Z0-9_]+')
- # Capitalize words split using a pattern
- clear_cache()
- no doc string
- compile(pat)
- no doc string
- expand(repl, regs, str)
- # Expand \digit in the replacement.
- # Each occurrence of \digit is replaced by the substring of str
- # indicated by regs[digit]. To include a literal \ in the
- # replacement, double it; other \ escapes are left unchanged (i.e.
- # the \ and the following character are both copied).
- gsub(pat, repl, str)
- # Replace all (non-overlapping) occurrences of pattern pat in string
- # str by replacement repl. The same rules as for sub() apply.
- # Empty matches for the pattern are replaced only when not adjacent to
- # a previous match, so e.g. gsub('', '-', 'abc') returns '-a-b-c-'.
- intsplit(str, pat, maxsplit, retain)
- # Internal function used to implement split() and splitx().
- split(str, pat, maxsplit=0)
- # Split string str in fields separated by delimiters matching pattern
- # pat. Only non-empty matches for the pattern are considered, so e.g.
- # split('abc', '') returns ['abc'].
- # The optional 3rd argument sets the number of splits that are performed.
- splitx(str, pat, maxsplit=0)
- # Split string str in fields separated by delimiters matching pattern
- # pat. Only non-empty matches for the pattern are considered, so e.g.
- # split('abc', '') returns ['abc']. The delimiters are also included
- # in the list.
- # The optional 3rd argument sets the number of splits that are performed.
- sub(pat, repl, str)
- # Replace first occurrence of pattern pat in string str by replacement
- # repl. If the pattern isn't found, the string is returned unchanged.
- # The replacement may contain references \digit to subpatterns and
- # escaped backslashes. The pattern may be a string or an already
- # compiled pattern.
- test()
- # Test program, reads sequences "pat repl str" from stdin.
- # Optional argument specifies pattern used to split lines.
|