Esempio n. 1
0
 /// <summary>
 /// Gets the beginning and ending character indices in the range for a
 /// given text.
 /// </summary>
 /// <param name="text">The text the characters represent.</param>
 /// <param name="firstCharacterIndex">Beginning index in the text.</param>
 /// <param name="lastCharacterIndex">Ending index in the text.</param>
 public void GetBeginAndEndCharacterIndices(
     string text,
     out int firstCharacterIndex,
     out int lastCharacterIndex)
 {
     firstCharacterIndex = BeginCharacterPosition.GetCharacterIndex(
         text, EndCharacterPosition, WordSearchDirection.Left);
     lastCharacterIndex = EndCharacterPosition.GetCharacterIndex(
         text, BeginCharacterPosition, WordSearchDirection.Right);
 }