Try using strcasecmp(), case-insensitive strcmp(), to do this in a single test (and catch Ip, iP as further matches).