// Token: 0x06003532 RID: 13618 RVA: 0x000F0E88 File Offset: 0x000EF088 internal static bool IsAtWordBoundary(char[] text, int position, LogicalDirection insideWordDirection) { SelectionWordBreaker.CharClass[] classes = SelectionWordBreaker.GetClasses(text); if (insideWordDirection == LogicalDirection.Backward) { if (position == text.Length) { return(true); } if (position == 0 || SelectionWordBreaker.IsWhiteSpace(text[position - 1], classes[position - 1])) { return(false); } } else { if (position == 0) { return(true); } if (position == text.Length || SelectionWordBreaker.IsWhiteSpace(text[position], classes[position])) { return(false); } } ushort[] array = new ushort[2]; SafeNativeMethods.GetStringTypeEx(0U, 4U, new char[] { text[position - 1], text[position] }, 2, array); return(SelectionWordBreaker.IsWordBoundary(text[position - 1], text[position]) || (!SelectionWordBreaker.IsSameClass(array[0], classes[position - 1], array[1], classes[position]) && !SelectionWordBreaker.IsMidLetter(text, position - 1, classes) && !SelectionWordBreaker.IsMidLetter(text, position, classes))); }
// Token: 0x06003539 RID: 13625 RVA: 0x000F1060 File Offset: 0x000EF260 private static SelectionWordBreaker.CharClass[] GetClasses(char[] text) { SelectionWordBreaker.CharClass[] array = new SelectionWordBreaker.CharClass[text.Length]; for (int i = 0; i < text.Length; i++) { char c = text[i]; SelectionWordBreaker.CharClass charClass; if (c < 'Ā') { charClass = (SelectionWordBreaker.CharClass)SelectionWordBreaker._latinClasses[(int)c]; } else if (SelectionWordBreaker.IsKorean(c)) { charClass = SelectionWordBreaker.CharClass.Alphanumeric; } else if (SelectionWordBreaker.IsThai(c)) { charClass = SelectionWordBreaker.CharClass.Alphanumeric; } else if (c == '') { charClass = (SelectionWordBreaker.CharClass.Blank | SelectionWordBreaker.CharClass.WBF_BREAKAFTER); } else { ushort[] array2 = new ushort[1]; SafeNativeMethods.GetStringTypeEx(0U, 1U, new char[] { c }, 1, array2); if ((array2[0] & 8) != 0) { if ((array2[0] & 64) != 0) { charClass = (SelectionWordBreaker.CharClass.Blank | SelectionWordBreaker.CharClass.WBF_ISWHITE); } else { charClass = (SelectionWordBreaker.CharClass.WhiteSpace | SelectionWordBreaker.CharClass.WBF_ISWHITE); } } else if ((array2[0] & 16) != 0 && !SelectionWordBreaker.IsDiacriticOrKashida(c)) { charClass = SelectionWordBreaker.CharClass.Punctuation; } else { charClass = SelectionWordBreaker.CharClass.Alphanumeric; } } array[i] = charClass; } return(array); }
// Token: 0x06003537 RID: 13623 RVA: 0x000F0FD4 File Offset: 0x000EF1D4 private static bool IsSameClass(ushort preceedingType3, SelectionWordBreaker.CharClass preceedingClass, ushort followingType3, SelectionWordBreaker.CharClass followingClass) { bool result = false; if (SelectionWordBreaker.IsIdeographicCharType(preceedingType3) && SelectionWordBreaker.IsIdeographicCharType(followingType3)) { ushort num = (preceedingType3 & 496) ^ (followingType3 & 496); result = ((preceedingType3 & 240) != 0 && (num == 0 || num == 128 || num == 32 || num == 160)); } else if (!SelectionWordBreaker.IsIdeographicCharType(preceedingType3) && !SelectionWordBreaker.IsIdeographicCharType(followingType3)) { result = ((preceedingClass & SelectionWordBreaker.CharClass.WBF_CLASS) == (followingClass & SelectionWordBreaker.CharClass.WBF_CLASS)); } return(result); }
// Token: 0x06003535 RID: 13621 RVA: 0x000F0F54 File Offset: 0x000EF154 private static bool IsMidLetter(char[] text, int index, SelectionWordBreaker.CharClass[] classes) { Invariant.Assert(text.Length == classes.Length); return((text[index] == '\'' || text[index] == '’' || text[index] == '') && index > 0 && index + 1 < classes.Length && ((classes[index - 1] == SelectionWordBreaker.CharClass.Alphanumeric && classes[index + 1] == SelectionWordBreaker.CharClass.Alphanumeric) || (text[index] == '"' && SelectionWordBreaker.IsHebrew(text[index - 1]) && SelectionWordBreaker.IsHebrew(text[index + 1])))); }
// Token: 0x0600353E RID: 13630 RVA: 0x000F1183 File Offset: 0x000EF383 private static bool IsHebrew(char ch) { return(SelectionWordBreaker.IsInRange(1488U, ch, 1522U)); }
// Token: 0x0600353D RID: 13629 RVA: 0x000F1171 File Offset: 0x000EF371 private static bool IsThai(char ch) { return(SelectionWordBreaker.IsInRange(3584U, ch, 3711U)); }
// Token: 0x0600353C RID: 13628 RVA: 0x000F115F File Offset: 0x000EF35F private static bool IsKorean(char ch) { return(SelectionWordBreaker.IsInRange(44032U, ch, 55295U)); }