コード例 #1
0
        // Methods that get the index of first match; otherwise return null

        public static int?FindFirstIndex(this TextRow row, string sought) =>
        row.FindFirstIndex(sought, StringComparison.Ordinal);
コード例 #2
0
 public static int?FindFirstIndex(this TextRow row,
                                  string sought, StringComparison comparison) =>
 row.FindFirstIndex(s => string.Equals(s, sought, comparison));
コード例 #3
0
 public static int GetFirstIndex(this TextRow row, Func <string, bool> predicate) =>
 row.FindFirstIndex(predicate) is int i ? i : throw new InvalidOperationException("Sequence contains no elements.");