grammar/src/util.hpp
/**
 * Returns the number of bytes the given character should have
 */
Returns the number of bytes the given character should have
Returns the number of bytes the given character should have
static inline int codePoint(const char &c) {
    if ((c & 0xf8) == 0xf0)
        return 4;
    else if ((c & 0xf0) == 0xe0)
        return 3;
    else if ((c & 0xe0) == 0xc0)
        return 2;
    return 1;
}
static inline int codePoint ( const char & c ) { if ( ( c & 0xf8 ) == 0xf0 ) return 4 ; else if ( ( c & 0xf0 ) == 0xe0 ) return 3 ; else if ( ( c & 0xe0 ) == 0xc0 ) return 2 ; return 1 ; }
Returns the number of bytes the given character should have
Returns the number of bytes the given character should have