diff --git a/X10D/src/Text/CharSpanExtensions.cs b/X10D/src/Text/CharSpanExtensions.cs index b5c0deb..7450c9a 100644 --- a/X10D/src/Text/CharSpanExtensions.cs +++ b/X10D/src/Text/CharSpanExtensions.cs @@ -11,7 +11,7 @@ public static class CharSpanExtensions /// The haystack search space. /// The character span to count. /// An integer representing the count of inside . - public static int CountSubstring(this Span haystack, Span needle) + public static int CountSubstring(this Span haystack, ReadOnlySpan needle) { return CountSubstring(haystack, needle, StringComparison.Ordinal); } @@ -23,7 +23,7 @@ public static class CharSpanExtensions /// The character span to count. /// The string comparison method used for determining substring count. /// An integer representing the count of inside . - public static int CountSubstring(this Span haystack, Span needle, StringComparison comparison) + public static int CountSubstring(this Span haystack, ReadOnlySpan needle, StringComparison comparison) { return CountSubstring((ReadOnlySpan)haystack, needle, comparison); }