(c: int)
| 54 | |
| 55 | |
| 56 | def isValidEntityCode(c: int) -> bool: |
| 57 | # broken sequence |
| 58 | if c >= 0xD800 and c <= 0xDFFF: |
| 59 | return False |
| 60 | # never used |
| 61 | if c >= 0xFDD0 and c <= 0xFDEF: |
| 62 | return False |
| 63 | if ((c & 0xFFFF) == 0xFFFF) or ((c & 0xFFFF) == 0xFFFE): |
| 64 | return False |
| 65 | # control codes |
| 66 | if c >= 0x00 and c <= 0x08: |
| 67 | return False |
| 68 | if c == 0x0B: |
| 69 | return False |
| 70 | if c >= 0x0E and c <= 0x1F: |
| 71 | return False |
| 72 | if c >= 0x7F and c <= 0x9F: |
| 73 | return False |
| 74 | # out of range |
| 75 | return not (c > 0x10FFFF) |
| 76 | |
| 77 | |
| 78 | def fromCodePoint(c: int) -> str: |
no outgoing calls
no test coverage detected
searching dependent graphs…