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

set character at string position

From: Lisa Pearlson <no@spam.plz>
Date: Fri Dec 30 2005 - 21:26:55 CET

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
Received on Tue Jan 3 03:09:50 2006