|
|
|
|
|
|
} |
|
|
|
|
|
|
|
char c = this._text.charAt(this._current); |
|
|
|
bool preType = char.IsWhiteSpace(c); |
|
|
|
bool preBoundaryChar = isBoundaryChar(c); |
|
|
|
this._current++; |
|
|
|
if (preBoundaryChar) { |
|
|
|
|
|
|
this._findBoundaryCharOrTypeChange(); |
|
|
|
this._findBoundaryCharOrTypeChange(preType); |
|
|
|
void _findBoundaryCharOrTypeChange() { |
|
|
|
char c = this._text.charAt(this._current); |
|
|
|
bool preType = char.IsWhiteSpace(c); |
|
|
|
void _findBoundaryCharOrTypeChange(bool preType) { |
|
|
|
for (; this._current < this._text.size; ++this._current) { |
|
|
|
// this.nextUntilCodePoint();
|
|
|
|
if (this._current >= this._text.size) { |
|
|
|
|
|
|
c = this._text.charAt(this._current); |
|
|
|
char c = this._text.charAt(this._current); |
|
|
|
if (isBoundaryChar(c)) { |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static bool isLeadSurrogate(uint c) { |
|
|
|
return ((c) & 0xfffffc00) == 0xd800; |
|
|
|
return (c & 0xfffffc00) == 0xd800; |
|
|
|
return ((c) & 0xfffffc00) == 0xdc00; |
|
|
|
return (c & 0xfffffc00) == 0xdc00; |
|
|
|
return (char) (((uint) (lead) << 10) + (uint) (trail - U16_SURROGATE_OFFSET)); |
|
|
|
return (char) (( lead << 10) + (trail - U16_SURROGATE_OFFSET)); |
|
|
|
return char.IsPunctuation(code) || code >= 0x4E00 && code <= 0x9FFF || code >= 0x3040 && code <= 0x30FF; |
|
|
|
return char.IsPunctuation(code) || (code >= 0x4E00 && code <= 0x9FFF) || (code >= 0x3040 && code <= 0x30FF); |
|
|
|
} |
|
|
|
|
|
|
|
void nextUntilCodePoint() { |
|
|
|