[Activetcl] Length of multi-line strings
by Mark Howe other posts by this author
Jul 1 2008 11:11AM messages near this date
view in the new Beta List Site
Re: [Activetcl] Procedure of creating Itcl Class library into a namespace package
|
Re: [Activetcl] Length of multi-line strings
Hi,
I have a script that assembles a string that includes several \n. This
works fine, except that when I use 'string length' or 'string
bytelength' to get its length I get the length of the first line, rather
than of the whole string. Am I missing something obvious here (other
than that TCL isn't very good at handling newlines)? If not, what's the
best workaround? At present, I'm thinking of using a regex to convert
all the characters in a copy of the string into a safe character, eg
'ZZZZZZZZ...' and then finding the length of that, but surely there is a
better way?
Regards,
Mark Howe
_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Mark Howe
Talvo Hornblower
Mark Howe
|