0

Hi Good afternoon, how to make the Asia as valid input

in strcmp Char*a="asia"; User inputs examples: Asia,asiA,ASia etc.

14th Nov 2022, 3:21 AM
light angel
light angel - avatar
2 Réponses
+ 1
Convert input to lower case before comparing. More complex and costly alternative: use regex match with case insensitive flag. (BTW, pls forget the "sir" part. That excludes all women.)
14th Nov 2022, 3:30 AM
Emerson Prado
Emerson Prado - avatar
0
My bad i only copied it, from my messages i forgotten to edit it.
14th Nov 2022, 3:32 AM
light angel
light angel - avatar