ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activetcl
activetcl
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved