tcl::prefix

tcl::prefix subcommand ?arg ...?

Matches a word to a unique prefix of a table, as a command does with its options.

Subcommands

Synopsis What it does
tcl::prefix match ?-exact? ?-message TEXT? ?-error OPTIONS? TABLE STRING The entry of TABLE that STRING is a unique prefix of, or an error.
tcl::prefix all TABLE STRING Each entry that starts with STRING.
tcl::prefix longest TABLE STRING The longest common prefix of those entries.

Examples

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

Facts