Exemplo n.º 1
0
 /// <summary>
 /// Retrieves the Unicode code point value that precedes the <paramref name="index"/>.
 /// </summary>
 /// <param name="text"></param>
 /// <param name="index">The index to the <see cref="char"/> code unit within this object.</param>
 /// <returns>The Unicode code point value.</returns>
 /// <seealso cref="Character"/>
 /// <seealso cref="Character.CodePointBefore(char[], int)"/>
 public static int CodePointBefore(this StringBuilder text, int index)
 {
     if (index < 1 || index > text.Length)
     {
         throw new IndexOutOfRangeException(nameof(index));
     }
     return(Character.CodePointBefore(text, index));
 }
Exemplo n.º 2
0
 public static int CodePointBefore(this string seq, int index)
 {
     return(Character.CodePointBefore(seq, index));
 }