|
Posted by Bryan Oakley on 04/21/06 20:04
Bryan Oakley wrote:
> Maybe you should file a bug with whomever wrote PROPER_CASE instead of
> trying to work around its limitations.
>
FWIW, the culprit is this infinite loop:
while {![regexp -nocase {[a-z]} [string index $wordlet $beginIndx]]} {
append nonWord [string index $wordlet $beginIndx]
incr beginIndx
}
Under the right conditions (such as a word beginning or ending with "-"
or "_"), $wordlet will be null. When wordlet is null, [string index
$wordlet $beginIndx] will be null for all values of $beginIndx, the
regexp will never match, and the loop will never terminate.
--
Bryan Oakley
http://www.tclscripting.com
Navigation:
[Reply to this message]
|