hey guys how would i figure out if a string has a number in it without using any aditional libraries?
revenge2 0 Junior Poster in Training
Recommended Answers
Jump to Post— Member #46692store a char array = ["0123456789"]
Loop through said string to check if it contains any of those numbers. Boom job done.
Jump to Post— Hiroshe 499store a char array = ["0123456789"]
Loop through said string to check if it contains any of those numbers. Boom job done.
Or loop through the string and check if any char is between the acsii value's of '0' and '9'.
All 5 Replies
Member #46692
Hiroshe 499 Posting Whiz in Training
Tom Gunn 1,164 Practically a Master Poster
revenge2 0 Junior Poster in Training
Hiroshe 499 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.