split

split string ?splitChars?
split string splitChars -grapheme

Makes a list: it cuts the string at each character of splitChars (white space by default). Two separators in a row give an empty element. An empty splitChars cuts between each character. With -grapheme, the unit is the grapheme cluster: an empty splitChars gives each cluster, and a split character cuts only where it is a whole cluster. The form with -grapheme needs the module ztcl::text in the build.

Examples

A click on an example runs it in the shell of the page.

Facts

Differences from Tcl 8.6