aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorchi <chi>2005-03-21 11:59:44 +0000
committerchi <chi>2005-03-21 11:59:44 +0000
commitd9ffadaa5411d62ff47c46532305dcac85c4e0bb (patch)
tree2915dafc08e876333c50cfb79297929f075afcce /doc
parent76e16dfe41d1cad0a7f01d1a45de0cbffe525c94 (diff)
downloadjimtcl-d9ffadaa5411d62ff47c46532305dcac85c4e0bb.zip
jimtcl-d9ffadaa5411d62ff47c46532305dcac85c4e0bb.tar.gz
jimtcl-d9ffadaa5411d62ff47c46532305dcac85c4e0bb.tar.bz2
Add the [scan] command and the Jim_ScanString function + tests.
The scanformat specification will be converted to a new Jim_Obj of type scanFormatStringObjType, that will contain the parsed representation within its internal object representation. This speed up multiple scanning within e.g. a loop, of objects were cached. For internal scanning we use sscanf currently (I am lazy right now). That means also, we will inherit its incapability to handle string with embedded ZERO. It would be not too difficult to implement another scanner just for the string and charset conversion type that could be able to handle those embedded ZEROs, however. Furthermore two small details were fixed: 1. Jim_DoubleToString should also recognize a number if a leading '+' or '-' occured. By recognizing I mean, add a ".0" to such a number. 2. Jim_StrDupLen should also properly handle duplication of substrings. So now it should be possible to do this: const char *str1 = "This is a long string"; char *substr1 = Jim_StrDupLen(str1, 4); Now substr1 should contain a properly ZERO ended "This".
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions