Ignore:
Timestamp:
Oct 8, 2014, 8:43:55 AM (5 years ago)
Author:
cameron
Message:

More functions for utf8 lib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/charsetcompiler/utf8_lib.py

    r4222 r4223  
    6464
    6565
     66#
     67def is_low_codepoint_after_byte(codepoint, byte):
     68    for i in range(byte, utf8_length(codepoint)):
     69        if utf8_byte(codepoint, i+1) != 0x80: return False
     70    return True
    6671
     72def is_high_codepoint_after_byte(codepoint, byte):
     73    for i in range(byte, utf8_length(codepoint)):
     74        if utf8_byte(codepoint, i+1) != 0xBF: return False
     75    return True
     76
     77
Note: See TracChangeset for help on using the changeset viewer.