entry index
Gives the number of the place that INDEX names.
PATHNAME index INDEX
Description
Changes an index of any form to a number from 0. A number past the end gives the length of the text.
Returns
An integer.
Examples
% entry .ix
> .ix insert 0 hello
> .ix index end
5
% entry .ix2
> .ix2 insert 0 hello
> .ix2 index 99
5
Errors
% entry .ix3; .ix3 index foo
bad entry index "foo"
-errorcode NONE
% entry .ix4; .ix4 index sel.first
selection isn't in widget .ix4
-errorcode NONE
% entry .ix5; .ix5 index
wrong # args: should be ".ix5 index string"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1