Sam,
The string Tcl command has many options. One of them is the ‘is class’ option. Do a help string in hcitcl to see all options etc.
example:
set junk abcdef
string is digit -strict $junk
—> returns a zero (not true)
set stuff 12345
string is digit -strict $stuff
—> returns a one (true)
set nonsense “”
string is digit -strict $nonsense
—> returns a zero (not true)
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.