// Token: 0x060039BF RID: 14783 RVA: 0x0010640C File Offset: 0x0010460C private static bool IsAtWordBoundary(string textString, int matchIndex, int matchLength, bool hasPreceedingSeparatorChar, bool hasFollowingSeparatorChar) { bool result = false; int length = textString.Length; Invariant.Assert(matchIndex + matchLength <= length); if (matchIndex == 0) { if (hasPreceedingSeparatorChar) { if (matchIndex + matchLength < length) { if (TextFindEngine.IsSeparatorChar(textString[matchIndex + matchLength])) { result = true; } } else if (hasFollowingSeparatorChar) { result = true; } } } else if (matchIndex + matchLength == length) { if (TextFindEngine.IsSeparatorChar(textString[matchIndex - 1]) && hasFollowingSeparatorChar) { result = true; } } else if (TextFindEngine.IsSeparatorChar(textString[matchIndex - 1]) && TextFindEngine.IsSeparatorChar(textString[matchIndex + matchLength])) { result = true; } return(result); }
// Token: 0x060039B5 RID: 14773 RVA: 0x00105CE8 File Offset: 0x00103EE8 private static bool HasNeighboringSeparatorChar(ITextPointer position, LogicalDirection direction) { ITextPointer textPointer = position.GetNextInsertionPosition(direction); if (textPointer == null) { return(true); } if (position.CompareTo(textPointer) > 0) { ITextPointer textPointer2 = position; position = textPointer; textPointer = textPointer2; } int offsetToPosition = position.GetOffsetToPosition(textPointer); char[] array = new char[offsetToPosition]; int[] findTextPositionMap = new int[offsetToPosition + 1]; int num = TextFindEngine.SetFindTextAndFindTextPositionMap(position, textPointer, position.CreatePointer(), LogicalDirection.Forward, false, array, findTextPositionMap); if (num == 0) { return(true); } bool result; if (direction == LogicalDirection.Forward) { result = TextFindEngine.IsSeparatorChar(array[0]); } else { result = TextFindEngine.IsSeparatorChar(array[num - 1]); } return(result); }