Re: set character at string position
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: set character at string position

From: Tom Conner <tconner@olopha.net>
Date: Sat Dec 31 2005 - 00:49:23 CET

"Lisa Pearlson" <no@spam.plz> wrote in message
news:43b597e1$0$16227$e4fe514c@dreader25.news.xs4all.nl...
> Hi,
>
> I looked at the string class, but I don't see how I can set/replace a
> character on a certain string position.
> In C I'd do something like:
>
> char s[] = "Hello";
> s[2] = 'x';
>
> This would give "Hexlo"
>
> How do I this in Tcl?
>
> Lisa
>
>

Have you considered buying a Tcl book?
Received on Tue Jan 3 03:09:54 2006