[Newbies] String construction and replacement

Sebastian Nozzi sebnozzi at googlemail.com
Sun Feb 1 19:46:58 UTC 2009


Hello List,

I've been struggling a bit with some basics about Strings for which I
couldn't find an answer (yet).

1) How to construct a String from Characters?

For example, I want to construct a String from the Chatacter literals:

$H $I
Character cr
$T $H $E $R $E

2) How to replace a sequence of Characters in a String for others?

For exaple, I want to replace every 'HI' (in this case only one) for
'HELLO' in the String above (not necesarily destructively, getting a
new String is also ok). Is there a quick way to do that?

Thanks in advance!

Sebastian


More information about the Beginners mailing list