isShorter
jul, 2008
problem:
efficient way fo seeing if a string is shorter than another
solution:
bool isShorter(const char *shorter, const char *longer) {
//returns
while (*shorter && *longer) {
shorter++;
longer++;
}
return *longer && !*shorter;
}