What’s the most efficient/safest way to check if a string in C is made up only of spaces? Do I need to write a function myself to check or is there one in string.h that I can use?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, writing your own is trivial:
Anything you use from the standard library is not likely to be much more efficient.