Mercurial > hg > xemacs-beta
comparison man/lispref/strings.texi @ 5791:9fae6227ede5
Silence texinfo 5.2 warnings, primarily by adding next, prev, and up
pointers to all nodes. See xemacs-patches message with ID
<5315f7bf.sHpFD7lXYR05GH6E%james@xemacs.org>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Thu, 27 Mar 2014 08:59:03 -0600 |
parents | 3889ef128488 |
children | 15041705c196 |
comparison
equal
deleted
inserted
replaced
5790:dcf9067f26bb | 5791:9fae6227ede5 |
---|---|
31 * Character Case:: Case conversion functions. | 31 * Character Case:: Case conversion functions. |
32 * Case Tables:: Customizing case conversion. | 32 * Case Tables:: Customizing case conversion. |
33 * Char Tables:: Mapping from characters to Lisp objects. | 33 * Char Tables:: Mapping from characters to Lisp objects. |
34 @end menu | 34 @end menu |
35 | 35 |
36 @node String Basics | 36 @node String Basics, Predicates for Strings, Strings and Characters, Strings and Characters |
37 @section String and Character Basics | 37 @section String and Character Basics |
38 | 38 |
39 Strings in XEmacs Lisp are arrays that contain an ordered sequence of | 39 Strings in XEmacs Lisp are arrays that contain an ordered sequence of |
40 characters. Characters are their own primitive object type in XEmacs | 40 characters. Characters are their own primitive object type in XEmacs |
41 20. However, in XEmacs 19, characters are represented in XEmacs Lisp as | 41 20. However, in XEmacs 19, characters are represented in XEmacs Lisp as |
98 | 98 |
99 @xref{Text}, for information about functions that display strings or | 99 @xref{Text}, for information about functions that display strings or |
100 copy them into buffers. @xref{Character Type}, and @ref{String Type}, | 100 copy them into buffers. @xref{Character Type}, and @ref{String Type}, |
101 for information about the syntax of characters and strings. | 101 for information about the syntax of characters and strings. |
102 | 102 |
103 @node Predicates for Strings | 103 @node Predicates for Strings, Creating Strings, String Basics, Strings and Characters |
104 @section The Predicates for Strings | 104 @section The Predicates for Strings |
105 | 105 |
106 For more information about general sequence and array predicates, | 106 For more information about general sequence and array predicates, |
107 see @ref{Sequences Arrays Vectors}, and @ref{Arrays}. | 107 see @ref{Sequences Arrays Vectors}, and @ref{Arrays}. |
108 | 108 |
118 In XEmacs addition, this function also returns @code{t} if @var{object} | 118 In XEmacs addition, this function also returns @code{t} if @var{object} |
119 is an integer that can be represented as a character. This is because | 119 is an integer that can be represented as a character. This is because |
120 of compatibility with previous XEmacs and should not be depended on. | 120 of compatibility with previous XEmacs and should not be depended on. |
121 @end defun | 121 @end defun |
122 | 122 |
123 @node Creating Strings | 123 @node Creating Strings, Predicates for Characters, Predicates for Strings, Strings and Characters |
124 @section Creating Strings | 124 @section Creating Strings |
125 | 125 |
126 The following functions create strings, either from scratch, or by | 126 The following functions create strings, either from scratch, or by |
127 putting strings together, or by taking them apart. | 127 putting strings together, or by taking them apart. |
128 | 128 |
273 | 273 |
274 The function @code{split-string}, in @ref{Regexp Search}, generates a | 274 The function @code{split-string}, in @ref{Regexp Search}, generates a |
275 list of strings by splitting a string on occurrences of a regular | 275 list of strings by splitting a string on occurrences of a regular |
276 expression. | 276 expression. |
277 | 277 |
278 @node Predicates for Characters | 278 @node Predicates for Characters, Character Codes, Creating Strings, Strings and Characters |
279 @section The Predicates for Characters | 279 @section The Predicates for Characters |
280 | 280 |
281 @defun characterp object | 281 @defun characterp object |
282 This function returns @code{t} if @var{object} is a character. | 282 This function returns @code{t} if @var{object} is a character. |
283 | 283 |
295 | 295 |
296 @defun integer-or-char-p object | 296 @defun integer-or-char-p object |
297 This function returns @code{t} if @var{object} is an integer or character. | 297 This function returns @code{t} if @var{object} is an integer or character. |
298 @end defun | 298 @end defun |
299 | 299 |
300 @node Character Codes | 300 @node Character Codes, Text Comparison, Predicates for Characters, Strings and Characters |
301 @section Character Codes | 301 @section Character Codes |
302 | 302 |
303 @defun char-int character | 303 @defun char-int character |
304 This function converts a character into an equivalent integer. | 304 This function converts a character into an equivalent integer. |
305 The resulting integer will always be non-negative. The integers in | 305 The resulting integer will always be non-negative. The integers in |
339 This function returns @code{t} if @var{object} is a character or an | 339 This function returns @code{t} if @var{object} is a character or an |
340 integer that can be converted into one. | 340 integer that can be converted into one. |
341 @end defun | 341 @end defun |
342 | 342 |
343 @need 2000 | 343 @need 2000 |
344 @node Text Comparison | 344 @node Text Comparison, String Conversion, Character Codes, Strings and Characters |
345 @section Comparison of Characters and Strings | 345 @section Comparison of Characters and Strings |
346 @cindex string equality | 346 @cindex string equality |
347 | 347 |
348 @defun char-equal character1 character2 &optional buffer | 348 @defun char-equal character1 character2 &optional buffer |
349 This function returns @code{t} if the arguments represent the same | 349 This function returns @code{t} if the arguments represent the same |
461 See also @code{compare-buffer-substrings} in @ref{Comparing Text}, for | 461 See also @code{compare-buffer-substrings} in @ref{Comparing Text}, for |
462 a way to compare text in buffers. The function @code{string-match}, | 462 a way to compare text in buffers. The function @code{string-match}, |
463 which matches a regular expression against a string, can be used | 463 which matches a regular expression against a string, can be used |
464 for a kind of string comparison; see @ref{Regexp Search}. | 464 for a kind of string comparison; see @ref{Regexp Search}. |
465 | 465 |
466 @node String Conversion | 466 @node String Conversion, Modifying Strings, Text Comparison, Strings and Characters |
467 @section Conversion of Characters and Strings | 467 @section Conversion of Characters and Strings |
468 @cindex conversion of strings | 468 @cindex conversion of strings |
469 | 469 |
470 This section describes functions for conversions between characters, | 470 This section describes functions for conversions between characters, |
471 strings and integers. @code{format} and @code{prin1-to-string} | 471 strings and integers. @code{format} and @code{prin1-to-string} |
575 | 575 |
576 @findex string-to-int | 576 @findex string-to-int |
577 @code{string-to-int} is an obsolete alias for this function. | 577 @code{string-to-int} is an obsolete alias for this function. |
578 @end defun | 578 @end defun |
579 | 579 |
580 @node Modifying Strings | 580 @node Modifying Strings, String Properties, String Conversion, Strings and Characters |
581 @section Modifying Strings | 581 @section Modifying Strings |
582 @cindex strings, modifying | 582 @cindex strings, modifying |
583 | 583 |
584 You can modify a string using the general array-modifying primitives. | 584 You can modify a string using the general array-modifying primitives. |
585 @xref{Arrays}. The function @code{aset} modifies a single character; | 585 @xref{Arrays}. The function @code{aset} modifies a single character; |
592 | 592 |
593 @defun string-modified-tick string | 593 @defun string-modified-tick string |
594 This function returns the tick counter for @samp{string}. | 594 This function returns the tick counter for @samp{string}. |
595 @end defun | 595 @end defun |
596 | 596 |
597 @node String Properties | 597 @node String Properties, Formatting Strings, Modifying Strings, Strings and Characters |
598 @section String Properties | 598 @section String Properties |
599 @cindex string properties | 599 @cindex string properties |
600 @cindex properties of strings | 600 @cindex properties of strings |
601 | 601 |
602 Just as with symbols, extents, faces, and glyphs, you can attach | 602 Just as with symbols, extents, faces, and glyphs, you can attach |
607 To attach a property to a string, use @code{put}. To retrieve a property | 607 To attach a property to a string, use @code{put}. To retrieve a property |
608 from a string, use @code{get}. You can also use @code{remprop} to remove | 608 from a string, use @code{get}. You can also use @code{remprop} to remove |
609 a property from a string and @code{object-plist} to retrieve a list of | 609 a property from a string and @code{object-plist} to retrieve a list of |
610 all the properties in a string. | 610 all the properties in a string. |
611 | 611 |
612 @node Formatting Strings | 612 @node Formatting Strings, Character Case, String Properties, Strings and Characters |
613 @section Formatting Strings | 613 @section Formatting Strings |
614 @cindex formatting strings | 614 @cindex formatting strings |
615 @cindex strings, formatting them | 615 @cindex strings, formatting them |
616 | 616 |
617 @dfn{Formatting} means constructing a string by substitution of | 617 @dfn{Formatting} means constructing a string by substitution of |
889 @samp{%e}, and @samp{%E} conversions even if no numbers are printed | 889 @samp{%e}, and @samp{%E} conversions even if no numbers are printed |
890 after it; and trailing zeroes are not omitted in @samp{%g} and @samp{%G} | 890 after it; and trailing zeroes are not omitted in @samp{%g} and @samp{%G} |
891 conversions. | 891 conversions. |
892 @end itemize | 892 @end itemize |
893 | 893 |
894 @node Character Case | 894 @node Character Case, Case Tables, Formatting Strings, Strings and Characters |
895 @section Character Case | 895 @section Character Case |
896 @cindex upper case | 896 @cindex upper case |
897 @cindex lower case | 897 @cindex lower case |
898 @cindex character case | 898 @cindex character case |
899 | 899 |
988 @result{} 88 ;; @r{Under XEmacs 19.} | 988 @result{} 88 ;; @r{Under XEmacs 19.} |
989 @end group | 989 @end group |
990 @end example | 990 @end example |
991 @end defun | 991 @end defun |
992 | 992 |
993 @node Case Tables | 993 @node Case Tables, Char Tables, Character Case, Strings and Characters |
994 @section The Case Table | 994 @section The Case Table |
995 | 995 |
996 You can customize case conversion by installing a special @dfn{case | 996 You can customize case conversion by installing a special @dfn{case |
997 table}. A case table specifies the mapping between upper case and lower | 997 table}. A case table specifies the mapping between upper case and lower |
998 case letters. It affects both the string and character case conversion | 998 case letters. It affects both the string and character case conversion |
1095 @cindex ISO Latin 1 | 1095 @cindex ISO Latin 1 |
1096 @pindex iso-syntax | 1096 @pindex iso-syntax |
1097 You can load the library @file{iso-syntax} to set up the standard syntax | 1097 You can load the library @file{iso-syntax} to set up the standard syntax |
1098 table and define a case table for the 8-bit ISO Latin 1 character set. | 1098 table and define a case table for the 8-bit ISO Latin 1 character set. |
1099 | 1099 |
1100 @node Char Tables | 1100 @node Char Tables, , Case Tables, Strings and Characters |
1101 @section The Char Table | 1101 @section The Char Table |
1102 | 1102 |
1103 A char table is a table that maps characters (or ranges of characters) | 1103 A char table is a table that maps characters (or ranges of characters) |
1104 to values. Char tables are specialized for characters, only allowing | 1104 to values. Char tables are specialized for characters, only allowing |
1105 particular sorts of ranges to be assigned values. Although this | 1105 particular sorts of ranges to be assigned values. Although this |
1144 @menu | 1144 @menu |
1145 * Char Table Types:: Char tables have different uses. | 1145 * Char Table Types:: Char tables have different uses. |
1146 * Working With Char Tables:: Creating and working with char tables. | 1146 * Working With Char Tables:: Creating and working with char tables. |
1147 @end menu | 1147 @end menu |
1148 | 1148 |
1149 @node Char Table Types | 1149 @node Char Table Types, Working With Char Tables, Char Tables, Char Tables |
1150 @subsection Char Table Types | 1150 @subsection Char Table Types |
1151 | 1151 |
1152 Each char table type is used for a different purpose and allows different | 1152 Each char table type is used for a different purpose and allows different |
1153 sorts of values. The different char table types are | 1153 sorts of values. The different char table types are |
1154 | 1154 |
1185 | 1185 |
1186 @defun valid-char-table-type-p type | 1186 @defun valid-char-table-type-p type |
1187 This function returns @code{t} if @var{type} if a recognized char table type. | 1187 This function returns @code{t} if @var{type} if a recognized char table type. |
1188 @end defun | 1188 @end defun |
1189 | 1189 |
1190 @node Working With Char Tables | 1190 @node Working With Char Tables, , Char Table Types, Char Tables |
1191 @subsection Working With Char Tables | 1191 @subsection Working With Char Tables |
1192 | 1192 |
1193 @defun make-char-table type | 1193 @defun make-char-table type |
1194 This function makes a new, empty char table of type @var{type}. | 1194 This function makes a new, empty char table of type @var{type}. |
1195 @var{type} should be a symbol, one of @code{char}, @code{category}, | 1195 @var{type} should be a symbol, one of @code{char}, @code{category}, |