Exemple #1
0
    public bool ScanCClass(int min, int max, CC x)
    {
        int i = 0;
        int at = st.pos;
        int upto = end;

        while (i < max && at < upto) {
            int oat = at;
            int ch = orig[at++];
            if (((uint)(ch - 0xD800)) < 0x400u && at != upto) {
                ch = orig[at++] + ch * 0x400 +
                   (0x10000 - (0xD800 * 0x400 + 0xDC00));
            }
            if (x.Accepts(ch)) {
                i++;
            } else {
                at = oat;
                break;
            }
        }

        st.pos = at;

        return (i >= min);
    }
Exemple #2
0
    public bool ScanCClass(int min, int max, CC x)
    {
        int i;
        int maxr = end - st.pos;
        if (maxr < max) max = maxr;

        for (i = 0; i < max && x.Accepts(orig[st.pos + i]); i++);
        st.pos += i;
        return (i >= min);
    }
Exemple #3
0
 public bool CClass(CC x)
 {
     if (st.pos++ == end) return false;
     int ho = orig[st.pos-1];
     int hs = ho - 0xD800;
     if (((uint)hs) < 0x400u && st.pos != end) {
         st.pos++;
         return x.Accepts(0x10000 - 0xDC00 + orig[st.pos-1] + 0x400 * hs);
     } else {
         return x.Accepts(ho);
     }
 }
Exemple #4
0
 public bool CClass(CC x)
 {
     return !(st.pos == end || !x.Accepts(orig[st.pos++]));
 }