int _findNextBoundaryNormal() { if (this._current == this._size) { return(-1); } WordSeparate.characterType preType = WordSeparate.classifyChar(this._text, this._current + this._offset); this._current++; for (; this._current < this._size; ++this._current) { this.nextUntilCodePoint(); if (this._current >= this._size) { break; } var currentType = WordSeparate.classifyChar(this._text, this._current + this._offset); if ((currentType == WordSeparate.characterType.WhiteSpace) != (preType == WordSeparate.characterType.WhiteSpace)) { break; } preType = currentType; } return(this._current); }
int _findNextBoundaryNormal() { if (this._current == this._text.size) { return(-1); } WordSeparate.characterType preType = WordSeparate.classifyChar(this._text.charAt(this._current)); bool preBoundaryChar = isBoundaryChar(this._text.charAt(this._current)); this._current++; if (preBoundaryChar) { return(this._current); } for (; this._current < this._text.size; ++this._current) { // this.nextUntilCodePoint(); if (this._current >= this._text.size) { break; } if (isBoundaryChar(this._text.charAt(this._current))) { break; } var currentType = WordSeparate.classifyChar(this._text.charAt(this._current)); if ((currentType == WordSeparate.characterType.WhiteSpace) != (preType == WordSeparate.characterType.WhiteSpace)) { break; } preType = currentType; } return(this._current); }