五月
04
2012

string compare strcmp implementation

bool mystrcmp(const char *a, const char *b) {
    while (*a == *b) {
        if (*a++ == '\0') return true;
        b++;
    }

    return *a == *b;
}
Written by in: Uncategorized |

無迴響 »

RSS feed for comments on this post. TrackBack URL


Leave a Reply

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com