test digits for "string" datatype
How can I test a string datatype for all digits? Notice I said string datatype...NOT character array! The isdigit works on char number[5] , not string number .
---
Joker2000
Stevie Ray Vaughan - The Legend
Edited by - Joker2000 on 7/17/00 4:05:11 PM
You should be able to access every single char from the string data type and test it with the isdigit macro. Hope this helps.
-------------------------------------
That's just my 200 bucks!
..-=gLaDiAtOr=-..
-------------------------------------
That's just my 200 bucks!
..-=gLaDiAtOr=-..
If you want your string to be treated as a regular C string you have to use .cstr();
so try your isdigit on number.cstr()
Edited by - SoGreen on July 17, 2000 5:49:52 PM
so try your isdigit on number.cstr()
Edited by - SoGreen on July 17, 2000 5:49:52 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement