Mercurial > emacs
comparison doc/lispref/strings.texi @ 100027:0f0810c1d1d1
(String Basics): Add an @xref to "Character Codes".
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 29 Nov 2008 12:19:22 +0000 |
parents | b869a303f165 |
children | 6119dd432ab8 |
comparison
equal
deleted
inserted
replaced
100026:ce90a3ecf576 | 100027:0f0810c1d1d1 |
---|---|
37 @node String Basics | 37 @node String Basics |
38 @section String and Character Basics | 38 @section String and Character Basics |
39 | 39 |
40 Characters are represented in Emacs Lisp as integers; | 40 Characters are represented in Emacs Lisp as integers; |
41 whether an integer is a character or not is determined only by how it is | 41 whether an integer is a character or not is determined only by how it is |
42 used. Thus, strings really contain integers. | 42 used. Thus, strings really contain integers. @xref{Character Codes}, |
43 for details about character representation in Emacs. | |
43 | 44 |
44 The length of a string (like any array) is fixed, and cannot be | 45 The length of a string (like any array) is fixed, and cannot be |
45 altered once the string exists. Strings in Lisp are @emph{not} | 46 altered once the string exists. Strings in Lisp are @emph{not} |
46 terminated by a distinguished character code. (By contrast, strings in | 47 terminated by a distinguished character code. (By contrast, strings in |
47 C are terminated by a character with @acronym{ASCII} code 0.) | 48 C are terminated by a character with @acronym{ASCII} code 0.) |
52 change individual characters in a string using the functions @code{aref} | 53 change individual characters in a string using the functions @code{aref} |
53 and @code{aset} (@pxref{Array Functions}). | 54 and @code{aset} (@pxref{Array Functions}). |
54 | 55 |
55 There are two text representations for non-@acronym{ASCII} characters in | 56 There are two text representations for non-@acronym{ASCII} characters in |
56 Emacs strings (and in buffers): unibyte and multibyte (@pxref{Text | 57 Emacs strings (and in buffers): unibyte and multibyte (@pxref{Text |
57 Representations}). An @acronym{ASCII} character always occupies one byte in a | 58 Representations}). For most Lisp programming, you don't need to be |
58 string; in fact, when a string is all @acronym{ASCII}, there is no real | 59 concerned with these two representations. |
59 difference between the unibyte and multibyte representations. | |
60 For most Lisp programming, you don't need to be concerned with these two | |
61 representations. | |
62 | 60 |
63 Sometimes key sequences are represented as strings. When a string is | 61 Sometimes key sequences are represented as strings. When a string is |
64 a key sequence, string elements in the range 128 to 255 represent meta | 62 a key sequence, string elements in the range 128 to 255 represent meta |
65 characters (which are large integers) rather than character | 63 characters (which are large integers) rather than character |
66 codes in the range 128 to 255. | 64 codes in the range 128 to 255. |