Mercurial > octave-nkf
comparison doc/interpreter/strings.txi @ 7081:503001863427
[project @ 2007-10-31 01:08:14 by jwe]
author | jwe |
---|---|
date | Wed, 31 Oct 2007 01:09:28 +0000 |
parents | 120f3135952f |
children | b2fbb393a072 |
comparison
equal
deleted
inserted
replaced
7080:7e465260a48f | 7081:503001863427 |
---|---|
235 Since a string is just a matrix, simple manipulations can be accomplished | 235 Since a string is just a matrix, simple manipulations can be accomplished |
236 using standard operators. The following example shows how to replace | 236 using standard operators. The following example shows how to replace |
237 all blank characters with underscores. | 237 all blank characters with underscores. |
238 | 238 |
239 @example | 239 @example |
240 quote = "First things first, but not necessarily in that order"; | 240 quote = ... |
241 "First things first, but not necessarily in that order"; | |
241 quote( quote == " " ) = "_" | 242 quote( quote == " " ) = "_" |
242 @print{} quote = First_things_first,_but_not_necessarily_in_that_order | 243 @result{} quote = |
244 First_things_first,_but_not_necessarily_in_that_order | |
243 @end example | 245 @end example |
244 | 246 |
245 For more complex manipulations, such as searching, replacing, and | 247 For more complex manipulations, such as searching, replacing, and |
246 general regular expressions, the following functions come with Octave. | 248 general regular expressions, the following functions come with Octave. |
247 | 249 |