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.

Recommended Answers

All 2 Replies

Depends 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.

there is a class has name string
i think that it is very useful for you

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.