annotate doc/interpreter/strings.txi @ 7001:8b0cfeb06365

[project @ 2007-10-10 18:02:59 by jwe]
author jwe
date Wed, 10 Oct 2007 18:03:02 +0000
parents 083721ae3dfa
children fd42779a8428
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6778
083721ae3dfa [project @ 2007-07-18 17:03:10 by jwe]
jwe
parents: 6624
diff changeset
1 @c Copyright (C) 1996, 1997, 2007 John W. Eaton
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
2 @c This is part of the Octave manual.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
3 @c For copying conditions, see the file gpl.texi.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
4
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 3920
diff changeset
5 @node Strings
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
6 @chapter Strings
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
7 @cindex strings
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
8 @cindex character strings
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
9 @opindex "
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
10 @opindex '
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
11
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
12 A @dfn{string constant} consists of a sequence of characters enclosed in
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
13 either double-quote or single-quote marks. For example, both of the
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
14 following expressions
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
15
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
16 @example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
17 @group
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
18 "parrot"
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
19 'parrot'
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
20 @end group
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
21 @end example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
22
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
23 @noindent
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
24 represent the string whose contents are @samp{parrot}. Strings in
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
25 Octave can be of any length.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
26
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
27 Since the single-quote mark is also used for the transpose operator
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
28 (@pxref{Arithmetic Ops}) but double-quote marks have no other purpose in
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
29 Octave, it is best to use double-quote marks to denote strings.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
30
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
31 @cindex escape sequence notation
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
32 In double-quoted strings, the backslash character is used to introduce
6623
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
33 @dfn{escape sequences} that represent other characters. For example,
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
34 @samp{\n} embeds a newline character in a double-quoted string and
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
35 @samp{\"} embeds a double quote character.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
36
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
37 In single-quoted strings, backslash is not a special character.
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
38
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
39 Here is an example showing the difference
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
40
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
41 @example
6556
8810bbf321ce [project @ 2007-04-20 18:39:40 by jwe]
jwe
parents: 6554
diff changeset
42 @group
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
43 toascii ("\n")
6570
49f0820425a8 [project @ 2007-04-24 23:06:56 by jwe]
jwe
parents: 6556
diff changeset
44 @result{} 10
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
45 toascii ('\n')
6570
49f0820425a8 [project @ 2007-04-24 23:06:56 by jwe]
jwe
parents: 6556
diff changeset
46 @result{} [ 92 110 ]
6556
8810bbf321ce [project @ 2007-04-20 18:39:40 by jwe]
jwe
parents: 6554
diff changeset
47 @end group
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
48 @end example
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
49
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
50 You may also insert a single quote character in a single-quoted string
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
51 by using two single quote characters in succession. For example,
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
52
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
53 @example
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
54 'I can''t escape'
6570
49f0820425a8 [project @ 2007-04-24 23:06:56 by jwe]
jwe
parents: 6556
diff changeset
55 @result{} I can't escape
6554
5dde4dc2bcaf [project @ 2007-04-20 17:16:50 by jwe]
jwe
parents: 6549
diff changeset
56 @end example
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
57
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
58 Here is a table of all the escape sequences used in Octave. They are
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
59 the same as those used in the C programming language.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
60
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
61 @table @code
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
62 @item \\
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
63 Represents a literal backslash, @samp{\}.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
64
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
65 @item \"
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
66 Represents a literal double-quote character, @samp{"}.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
67
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
68 @item \'
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
69 Represents a literal single-quote character, @samp{'}.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
70
3893
abd8659eea11 [project @ 2002-04-09 21:36:31 by jwe]
jwe
parents: 3428
diff changeset
71 @item \0
4946
48a39e2b2ab7 [project @ 2004-08-31 17:27:04 by jwe]
jwe
parents: 4535
diff changeset
72 Represents the ``nul'' character, control-@@, ASCII code 0.
3893
abd8659eea11 [project @ 2002-04-09 21:36:31 by jwe]
jwe
parents: 3428
diff changeset
73
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
74 @item \a
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
75 Represents the ``alert'' character, control-g, ASCII code 7.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
76
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
77 @item \b
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
78 Represents a backspace, control-h, ASCII code 8.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
79
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
80 @item \f
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
81 Represents a formfeed, control-l, ASCII code 12.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
82
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
83 @item \n
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
84 Represents a newline, control-j, ASCII code 10.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
85
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
86 @item \r
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
87 Represents a carriage return, control-m, ASCII code 13.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
88
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
89 @item \t
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
90 Represents a horizontal tab, control-i, ASCII code 9.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
91
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
92 @item \v
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
93 Represents a vertical tab, control-k, ASCII code 11.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
94
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
95 @c We don't do octal or hex this way yet.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
96 @c
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
97 @c @item \@var{nnn}
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
98 @c Represents the octal value @var{nnn}, where @var{nnn} are one to three
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
99 @c digits between 0 and 7. For example, the code for the ASCII ESC
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
100 @c (escape) character is @samp{\033}.@refill
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
101 @c
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
102 @c @item \x@var{hh}@dots{}
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
103 @c Represents the hexadecimal value @var{hh}, where @var{hh} are hexadecimal
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
104 @c digits (@samp{0} through @samp{9} and either @samp{A} through @samp{F} or
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
105 @c @samp{a} through @samp{f}). Like the same construct in @sc{ansi} C,
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
106 @c the escape
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
107 @c sequence continues until the first non-hexadecimal digit is seen. However,
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
108 @c using more than two hexadecimal digits produces undefined results. (The
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
109 @c @samp{\x} escape sequence is not allowed in @sc{posix} @code{awk}.)@refill
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
110 @end table
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
111
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
112 Strings may be concatenated using the notation for defining matrices.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
113 For example, the expression
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
114
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
115 @example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
116 [ "foo" , "bar" , "baz" ]
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
117 @end example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
118
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
119 @noindent
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
120 produces the string whose contents are @samp{foobarbaz}. @xref{Numeric
3402
9610d364e444 [project @ 2000-01-05 04:36:38 by jwe]
jwe
parents: 3361
diff changeset
121 Data Types}, for more information about creating matrices.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
122
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
123 @menu
6624
0d69a50fc5a9 [project @ 2007-05-15 20:17:27 by jwe]
jwe
parents: 6623
diff changeset
124 * Creating Strings::
0d69a50fc5a9 [project @ 2007-05-15 20:17:27 by jwe]
jwe
parents: 6623
diff changeset
125 * Comparing Strings::
0d69a50fc5a9 [project @ 2007-05-15 20:17:27 by jwe]
jwe
parents: 6623
diff changeset
126 * Manipulating Strings::
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
127 * String Conversions::
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
128 * Character Class Functions::
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
129 @end menu
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
130
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 3920
diff changeset
131 @node Creating Strings
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
132 @section Creating Strings
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
133
6623
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
134 The easiest way to create a string is, as illustrated in the introduction,
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
135 to enclose a text in double-quotes or single-quotes. It is however
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
136 possible to create a string without actually writing a text. The
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
137 function @code{blanks} creates a string of a given length consisting
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
138 only of blank characters (ASCII code 32).
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
139
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
140 @DOCSTRING(blanks)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
141
6623
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
142 The string representation used by Octave is an array of characters, so
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
143 the result of @code{blanks(10)} is actually a row vector of length 10
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
144 containing the value 32 in all places. This lends itself to the obvious
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
145 generalisation to character matrices. Using a matrix of characters, it
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
146 is possible to represent a collection of same-length strings in one
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
147 variable. The convention used in Octave is that each row in a
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
148 character matrix is a separate string, but letting each column represent
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
149 a string is equally possible.
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
150
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
151 The easiest way to create a character matrix is to put several strings
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
152 together into a matrix.
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
153
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
154 @example
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
155 collection = [ "String #1"; "String #2" ];
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
156 @end example
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
157
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
158 @noindent
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
159 This creates a 2-by-9 character matrix.
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
160
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
161 One relevant question is, what happens when character matrix is
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
162 created from strings of different length. The answer is that Octave
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
163 puts blank characters at the end of strings shorter than the longest
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
164 string. While it is possible to use a different character than the
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
165 blank character using the @code{string_fill_char} function, it shows
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
166 a problem with character matrices. It simply isn't possible to
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
167 represent strings of different lengths. The solution is to use a cell
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
168 array of strings, which is described in @ref{Cell Arrays of Strings}.
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
169
4358
83d4452bc522 [project @ 2003-02-23 02:16:53 by jwe]
jwe
parents: 4167
diff changeset
170 @DOCSTRING(char)
83d4452bc522 [project @ 2003-02-23 02:16:53 by jwe]
jwe
parents: 4167
diff changeset
171
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
172 @DOCSTRING(strcat)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
173
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
174 @DOCSTRING(strvcat)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
175
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
176 @DOCSTRING(strtrunc)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
177
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
178 @DOCSTRING(string_fill_char)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
179
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
180 @DOCSTRING(str2mat)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
181
4535
a5f23212a3d8 [project @ 2003-10-16 02:39:15 by jwe]
jwe
parents: 4452
diff changeset
182 @DOCSTRING(ischar)
a5f23212a3d8 [project @ 2003-10-16 02:39:15 by jwe]
jwe
parents: 4452
diff changeset
183
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
184 @DOCSTRING(mat2str)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
185
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
186 @DOCSTRING(num2str)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
187
6623
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
188 @DOCSTRING(int2str)
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
189
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
190 @node Comparing Strings
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
191 @section Comparing Strings
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
192
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
193 Since a string is a character array comparison between strings work
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
194 element by element as the following example shows.
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
195
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
196 @example
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
197 GNU = "GNU's Not UNIX";
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
198 spaces = (GNU == " ")
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
199 @result{} spaces =
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
200 0 0 0 0 0 1 0 0 0 1 0 0 0 0
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
201 @end example
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
202
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
203 @noindent
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
204 To determine if two functions are identical it is therefore necessary
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
205 to use the @code{strcmp} or @code{strncpm} functions. Similar
7001
8b0cfeb06365 [project @ 2007-10-10 18:02:59 by jwe]
jwe
parents: 6778
diff changeset
206 functions exist for doing case-insensitive comparisons.
6623
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
207
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
208 @DOCSTRING(strcmp)
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
209
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
210 @DOCSTRING(strcmpi)
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
211
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
212 @DOCSTRING(strncmp)
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
213
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
214 @DOCSTRING(strncmpi)
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
215
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
216 @node Manipulating Strings
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
217 @section Manipulating Strings
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
218
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
219 Octave supports a wide range of functions for manipulating strings.
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
220 Since a string is just a matrix, simple manipulations can be accomplished
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
221 using standard operators. The following example shows how to replace
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
222 all blank characters with underscores.
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
223
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
224 @example
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
225 quote = "First things first, but not necessarily in that order";
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
226 quote( quote == " " ) = "_"
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
227 @print{} quote = First_things_first,_but_not_necessarily_in_that_order
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
228 @end example
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
229
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
230 For more complex manipulations, such as searching, replacing, and
7001
8b0cfeb06365 [project @ 2007-10-10 18:02:59 by jwe]
jwe
parents: 6778
diff changeset
231 general regular expressions, the following functions come with Octave.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
232
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
233 @DOCSTRING(deblank)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
234
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
235 @DOCSTRING(findstr)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
236
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
237 @DOCSTRING(index)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
238
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
239 @DOCSTRING(rindex)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
240
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
241 @DOCSTRING(strfind)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
242
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
243 @DOCSTRING(strmatch)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
244
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
245 @DOCSTRING(strtok)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
246
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
247 @DOCSTRING(split)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
248
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
249 @DOCSTRING(strrep)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
250
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
251 @DOCSTRING(substr)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
252
5582
6bf56668b01a [project @ 2005-12-15 01:08:20 by jwe]
jwe
parents: 4946
diff changeset
253 @DOCSTRING(regexp)
6bf56668b01a [project @ 2005-12-15 01:08:20 by jwe]
jwe
parents: 4946
diff changeset
254
6bf56668b01a [project @ 2005-12-15 01:08:20 by jwe]
jwe
parents: 4946
diff changeset
255 @DOCSTRING(regexpi)
6bf56668b01a [project @ 2005-12-15 01:08:20 by jwe]
jwe
parents: 4946
diff changeset
256
6549
5a5a09d7deb8 [project @ 2007-04-20 06:55:29 by jwe]
jwe
parents: 6502
diff changeset
257 @DOCSTRING(regexprep)
5a5a09d7deb8 [project @ 2007-04-20 06:55:29 by jwe]
jwe
parents: 6502
diff changeset
258
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 3920
diff changeset
259 @node String Conversions
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
260 @section String Conversions
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
261
6623
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
262 Octave supports various kinds of conversions between strings and
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
263 numbers. As an example, it is possible to convert a string containing
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
264 a hexadecimal number to a floating point number.
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
265
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
266 @example
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
267 hex2dec ("FF")
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
268 @result{} ans = 255
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
269 @end example
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
270
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
271 @DOCSTRING(bin2dec)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
272
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
273 @DOCSTRING(dec2bin)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
274
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
275 @DOCSTRING(dec2hex)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
276
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
277 @DOCSTRING(hex2dec)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
278
3920
87db95b22f8f [project @ 2002-05-01 04:07:31 by jwe]
jwe
parents: 3893
diff changeset
279 @DOCSTRING(dec2base)
87db95b22f8f [project @ 2002-05-01 04:07:31 by jwe]
jwe
parents: 3893
diff changeset
280
87db95b22f8f [project @ 2002-05-01 04:07:31 by jwe]
jwe
parents: 3893
diff changeset
281 @DOCSTRING(base2dec)
87db95b22f8f [project @ 2002-05-01 04:07:31 by jwe]
jwe
parents: 3893
diff changeset
282
6623
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
283 @DOCSTRING(str2double)
3920
87db95b22f8f [project @ 2002-05-01 04:07:31 by jwe]
jwe
parents: 3893
diff changeset
284
6623
545847da3b88 [project @ 2007-05-15 02:23:08 by jwe]
jwe
parents: 6570
diff changeset
285 @DOCSTRING(strjust)
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 6501
diff changeset
286
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
287 @DOCSTRING(str2num)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
288
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
289 @DOCSTRING(toascii)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
290
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
291 @DOCSTRING(tolower)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
292
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
293 @DOCSTRING(toupper)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
294
3428
5b77cf82393c [project @ 2000-01-14 02:54:53 by jwe]
jwe
parents: 3402
diff changeset
295 @DOCSTRING(do_string_escapes)
5b77cf82393c [project @ 2000-01-14 02:54:53 by jwe]
jwe
parents: 3402
diff changeset
296
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
297 @DOCSTRING(undo_string_escapes)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
298
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 3920
diff changeset
299 @node Character Class Functions
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
300 @section Character Class Functions
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
301
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
302 Octave also provides the following character class test functions
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
303 patterned after the functions in the standard C library. They all
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
304 operate on string arrays and return matrices of zeros and ones.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
305 Elements that are nonzero indicate that the condition was true for the
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
306 corresponding character in the string array. For example,
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
307
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
308 @example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
309 @group
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
310 isalpha ("!Q@@WERT^Y&")
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
311 @result{} [ 0, 1, 0, 1, 1, 1, 1, 0, 1, 0 ]
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
312 @end group
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
313 @end example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
314
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
315 @DOCSTRING(isalnum)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
316
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
317 @DOCSTRING(isalpha)
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
318
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
319 @DOCSTRING(isascii)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
320
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
321 @DOCSTRING(iscntrl)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
322
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
323 @DOCSTRING(isdigit)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
324
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
325 @DOCSTRING(isgraph)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
326
6549
5a5a09d7deb8 [project @ 2007-04-20 06:55:29 by jwe]
jwe
parents: 6502
diff changeset
327 @DOCSTRING(isletter)
5a5a09d7deb8 [project @ 2007-04-20 06:55:29 by jwe]
jwe
parents: 6502
diff changeset
328
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
329 @DOCSTRING(islower)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
330
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
331 @DOCSTRING(isprint)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
332
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
333 @DOCSTRING(ispunct)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
334
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
335 @DOCSTRING(isspace)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
336
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
337 @DOCSTRING(isupper)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
338
3361
4f40efa995c1 [project @ 1999-11-19 21:19:37 by jwe]
jwe
parents: 3294
diff changeset
339 @DOCSTRING(isxdigit)