Do you mean you have a character representation of an integer? Like "4129"? Or do you have a character string whose bytes you want to represent as an integer?
In the former case, the string is already an integer as far as Tcl is concerned.
In the latter case, I think you want "binary scan". For example:
Code:
% set a xyz
xyz
% binary scan $a H6 b
1
% set b
78797a
%
The string, "xyz", is 3 bytes, or 6 hexadecimal characters.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.