Looking for the best way to search a string for project that must test for bad input. Must be able to detect wrong characters, letters, etc.
guitarrick
0
Junior Poster in Training
Recommended Answers
Jump to PostDepends I suppose on the list of wrong characters, and the type of string you're going to use, etc. A brute force char by char analysis of the string will always work of course, but you may be able to use find(), strtok(), etc too, depending on the situation.
All 2 Replies
Reply to this topic
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.