|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
To use the string functions in Elib you have to put the following line into your elisp source file:
The following string functions are provided with Elib.
(string-replace-match regexp string newtext &optional literal global)
This function tries to be a string near-equivalent to the elisp function
replace-match. It returns a string with the first text matched
by regexp in string replaced by newtext. If no match
nil is returned. If optional argument global is
nil, all occurances matching regexp are replaced
instead of only the first one.
If optional argument literal is non-
nil, then newtext
is inserted exactly as it is. If it is
nil (which is the
default), then the character \ is treated specially. If a \
appears in newtext, it can start any one of the following sequences:
\(...\). n is a digit.
Any other character after the \ will just be copied into the string.
(string-split pattern string &optional limit)
Split the string string on the regexp pattern and return a list of the strings between the matches. If the optional numerical argument limit is >= 1, only the first limit elements of the list are returned.
For example, the call
(string-split "[ \t]+" "Elisp programming is fun.")
("Elisp" "programming" "is" "fun."), but the call
(string-split " " "Elisp programming is fun." 3)
("Elisp" "programming" "is").
|[ << ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|