Ah ha! Yes, I did check the docs but I think I just glanced over that portion. Be more careful next time. The < is a less than sign but it seems it doesn’t render correctly on Lemmy.
Comment on Why does isalpha() fail to identify an alphabetic character?
jjagaimo@lemmy.ca 11 months ago
isalpha
documentation:
Return value Non-zero value if the character is an alphabetic character, zero otherwise.
You should be either checking for not equal to 0 instead of true, as its not necessarily guaranteed to be 1
~= true
Also make sure that your loop condition is <
and not <
For more information, make sure to check the documentation for the standard library functions
milon@lemm.ee 11 months ago
lolcatnip@reddthat.com 11 months ago
Never, ever write “== true” or “== false” unless it’s absolutely necessary.
pHr34kY@lemmy.world 11 months ago
I would drop the “== true” entirely. C will evaluate any nonzero int as true in an “if” statement.
milon@lemm.ee 11 months ago
Good point!