Reply to Re: How do you convert a TCL list into a string that PHP can read?

Your name:

Reply:


Posted by comp.lang.tcl on 04/21/06 20:03

Gerald W. Lester wrote:
> Bryan Oakley wrote:
> > comp.lang.tcl wrote:
> >> Sorry, there is no further description I can give you. tclsh locks,
> >> produces 100% CPU usage when you view via top, no error logs of any
> >> kind.
> >>
> >> Here is PROPER_CASE:
> >> <snip>
> >
> > Holy cow! All that just to change the case of words in a string?
> >
> > The proc is a bit buggy at first glance. It's amazing it works at all.
> > It takes a string, does some string operations on it, then iterates over
> > it as if it were a list and performs list operations on it. Then, it
> > takes the list, performs string operations on it and returns a string.
> >
> > Indeed, testing it out by copying it into a tclsh session, it _is_
> > buggy. If the first char is "-" it gets in an infinite loop.
> >
> > Maybe you should file a bug with whomever wrote PROPER_CASE instead of
> > trying to work around its limitations.
> >
>
> It does a *little* more than [string totitle $string] -- it ignores two
> letter state "names" -- but not much.
>

Last I checked [string totitle] doesn't capitalize hyphenated names,
Scots/Irish/Dutch names, etc. I wrote it back in 2000, when I only had
about a year's knowledge of TCL at the time, I'm sure it needs a bit of
fine-tuning, but it does the job it's supposed to do.

Phil

> My guess is this is a "translation" of a procedure from another language by
> someone who does not have a good knowledge of Tcl.
>
> --
> +--------------------------------+---------------------------------------+
> | Gerald W. Lester |
> |"The man who fights for his ideals is the man who is alive." - Cervantes|
> +------------------------------------------------------------------------+

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация