diff man/lispref/strings.texi @ 280:7df0dd720c89 r21-0b38

Import from CVS: tag r21-0b38
author cvs
date Mon, 13 Aug 2007 10:32:22 +0200
parents fe104dbd9147
children 558f606b08ae
line wrap: on
line diff
--- a/man/lispref/strings.texi	Mon Aug 13 10:31:30 2007 +0200
+++ b/man/lispref/strings.texi	Mon Aug 13 10:32:22 2007 +0200
@@ -114,6 +114,10 @@
 @defun char-or-string-p object
   This function returns @code{t} if @var{object} is a string or a
 character, @code{nil} otherwise.
+
+In XEmacs addition, this function also returns @code{t} if @var{object}
+is an integer that can be represented as a character.  This is because
+of compatibility with previous XEmacs and should not be depended on.
 @end defun
 
 @node Creating Strings
@@ -122,6 +126,22 @@
   The following functions create strings, either from scratch, or by
 putting strings together, or by taking them apart.
 
+@defun string &rest characters
+  This function returns of string made up of @var{characters}.
+
+@example
+(string ?X ?E ?m ?a ?c ?s)
+     @result{} "XEmacs"
+(string)
+     @result{} ""
+@end example
+
+Analogous functions operating on other data types include @code{list},
+@code{cons} (@pxref{Building Lists}), @code{vector} (@pxref{Vectors})
+and @code{bit-vector} (@pxref{Bit Vectors}).  This function has not been 
+available in XEmacs prior to 21.0 and FSF Emacs prior to 20.3.
+@end defun
+
 @defun make-string count character
   This function returns a string made up of @var{count} repetitions of
 @var{character}.  If @var{count} is negative, an error is signaled.
@@ -538,16 +558,19 @@
 See also the function @code{format} in @ref{Formatting Strings}.
 @end defun
 
-@defun string-to-number string
+@defun string-to-number string &optional base
 @cindex string to number
 This function returns the numeric value of the characters in
-@var{string}, read in base ten.  It skips spaces and tabs at the
+@var{string}, read in @var{base}.  It skips spaces and tabs at the
 beginning of @var{string}, then reads as much of @var{string} as it can
 interpret as a number.  (On some systems it ignores other whitespace at
 the beginning, not just spaces and tabs.)  If the first character after
 the ignored whitespace is not a digit or a minus sign, this function
 returns 0.
 
+If @var{base} is not specified, it defaults to ten.  With @var{base}
+other than ten, only integers can be read.
+
 @example
 (string-to-number "256")
      @result{} 256
@@ -557,6 +580,8 @@
      @result{} 0
 (string-to-number "-4.5")
      @result{} -4.5
+(string-to-number "ffff" 16)
+     @result{} 65535
 @end example
 
 @findex string-to-int
@@ -740,6 +765,10 @@
 @samp{ }, @samp{0}, and @samp{#}.
 
 @item
+An asterisk (@samp{*}, meaning that the field width is now assumed to
+have been specified as an argument.
+
+@item
 An optional minimum field width.
 
 @item