+2013-12-23 Xue Fuqiao <xfq.free@gmail.com>
+
+ * strings.texi (Creating Strings): Document TRIM in `split-string'.
+
2013-12-23 Chong Yidong <cyd@gnu.org>
* keymaps.texi (Controlling Active Maps): Renamed
combine-and-quote-strings}.
@end defun
-@defun split-string string &optional separators omit-nulls
+@defun split-string string &optional separators omit-nulls trim
This function splits @var{string} into substrings based on the regular
expression @var{separators} (@pxref{Regular Expressions}). Each match
for @var{separators} defines a splitting point; the substrings between
@result{} ("o" "o" "o")
@end example
+If the optional argument @var{trim} is non-@code{nil}, it should be a
+regular expression to match text to trim from the beginning and end of
+each substring. If trimming makes the substring empty, it is treated
+as null.
+
If you need to split a string into a list of individual command-line
arguments suitable for @code{call-process} or @code{start-process},
see @ref{Shell Arguments, split-string-and-unquote}.
** `byte-compile-interactive-only-functions' is now obsolete.
It has been replaced by the symbol property 'interactive-only.
++++
** `split-string' now takes an optional argument TRIM.
The value, if non-nil, is a regexp that specifies what to trim from
the start and end of each substring.