]> git.eshelyaron.com Git - emacs.git/commitdiff
* doc/lispintro/emacs-lisp-intro.texi (Data types):
authorXue Fuqiao <xfq.free@gmail.com>
Thu, 25 Jun 2015 02:23:03 +0000 (10:23 +0800)
committerXue Fuqiao <xfq.free@gmail.com>
Thu, 25 Jun 2015 02:23:03 +0000 (10:23 +0800)
Improve documentation of 'substring'.

doc/lispintro/emacs-lisp-intro.texi

index 83d6022c0a6e7e6092856c4d8d5d1cad9ee692d1..183e68f66601b6ed811ff7db28514afaac488fda 100644 (file)
@@ -1947,10 +1947,12 @@ The value produced by evaluating this expression is @code{"abcdef"}.
 A function such as @code{substring} uses both a string and numbers as
 arguments.  The function returns a part of the string, a substring of
 the first argument.  This function takes three arguments.  Its first
-argument is the string of characters, the second and third arguments are
-numbers that indicate the beginning and end of the substring.  The
-numbers are a count of the number of characters (including spaces and
-punctuation) from the beginning of the string.
+argument is the string of characters, the second and third arguments
+are numbers that indicate the beginning (inclusive) and end
+(exclusive) of the substring.  The numbers are a count of the number
+of characters (including spaces and punctuation) from the beginning of
+the string. Note that the characters in a string are numbered from
+zero, not one.
 
 @need 800
 For example, if you evaluate the following: