O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Faster String Operations

The UTF-8 encoding has the drawback that characters are not all the same size: they are either one, two, or three bytes in length. This makes operations like string length, string index, and string range quite slow in comparison to a system that uses fixed-sized characters. A new Unicode string type, which uses 16-bit characters, was added to support faster string operations. This does not cause any changes that are visible to Tcl scripts, except for improved performance in comparison to Tcl 8.1.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required