//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#: //ORIGINAL LINE: System.IntPtr wordEnd() const; public uint wordEnd() { if (mInEmailOrUrl) { return(mLast); } uint result = mCurrent; while (result > mLast) { UChar32 c = new UChar32(); uint ix = result; U16_PREV(mText, mLast, ix, c); int gc_mask = U_GET_GC_MASK(c); // strip trailing space and punctuation if ((gc_mask & (U_GC_ZS_MASK | U_GC_P_MASK)) == 0) { break; } result = ix; } return(result); }
// After calling next(), wordStart() and wordEnd() are offsets defining the // previous word. If wordEnd <= wordStart, it's not a word for the purpose of // hyphenation. //C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#: //ORIGINAL LINE: System.IntPtr wordStart() const; public uint wordStart() { if (mInEmailOrUrl) { return(mLast); } uint result = mLast; while (result < mCurrent) { UChar32 c = new UChar32(); uint ix = result; U16_NEXT(mText, ix, mCurrent, c); int lb = u_getIntPropertyValue(c, UCHAR_LINE_BREAK); // strip leading punctuation, defined as OP and QU line breaking classes, // see UAX #14 if (!(lb == U_LB_OPEN_PUNCTUATION || lb == U_LB_QUOTATION)) { break; } result = ix; } return(result); }