Skip to content

Commit 7080bdf

Browse files
committed
renamed span in Split methods to soure
1 parent dd93235 commit 7080bdf

File tree

2 files changed

+97
-97
lines changed

2 files changed

+97
-97
lines changed

src/Extensions/ReadOnlySpan/ReadOnlySpanExtensions.Split.cs

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -13,150 +13,150 @@ public static partial class ReadOnlySpanExtensions
1313
/// Splits a <see cref="ReadOnlySpan{T}"/> into multiple ReadOnlySpans based on the specified <paramref name="delimiter"/>.
1414
/// </summary>
1515
/// <typeparam name="T">The type of elements in the <see cref="ReadOnlySpan{T}"/>.</typeparam>
16-
/// <param name="span">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
17-
/// <param name="delimiter">An instance of <typeparamref name="T"/> that delimits the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
16+
/// <param name="source">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
17+
/// <param name="delimiter">An instance of <typeparamref name="T"/> that delimits the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
1818
/// <returns>An instance of the ref struct <see cref="SpanSplitEnumerator{T}"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
19-
public static SpanSplitEnumerator<T> Split<T>(this ReadOnlySpan<T> span, T delimiter) where T : IEquatable<T>
19+
public static SpanSplitEnumerator<T> Split<T>(this ReadOnlySpan<T> source, T delimiter) where T : IEquatable<T>
2020
{
21-
return new SpanSplitEnumerator<T>(span, delimiter);
21+
return new SpanSplitEnumerator<T>(source, delimiter);
2222
}
2323

2424
/// <summary>
2525
/// Splits a <see cref="ReadOnlySpan{T}"/> into at most <paramref name="count"/> ReadOnlySpans based on the specified <paramref name="delimiter"/>.
2626
/// </summary>
2727
/// <typeparam name="T">The type of elements in the <see cref="ReadOnlySpan{T}"/>.</typeparam>
28-
/// <param name="span">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
29-
/// <param name="delimiter">An instance of <typeparamref name="T"/> that delimits the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
28+
/// <param name="source">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
29+
/// <param name="delimiter">An instance of <typeparamref name="T"/> that delimits the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
3030
/// <param name="count">The maximum number of sub-ReadOnlySpans to split into.</param>
3131
/// <returns>An instance of the ref struct <see cref="SpanSplitWithCountEnumerator{T}"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
32-
public static SpanSplitWithCountEnumerator<T> Split<T>(this ReadOnlySpan<T> span, T delimiter, int count) where T : IEquatable<T>
32+
public static SpanSplitWithCountEnumerator<T> Split<T>(this ReadOnlySpan<T> source, T delimiter, int count) where T : IEquatable<T>
3333
{
34-
return new SpanSplitWithCountEnumerator<T>(span, delimiter, count);
34+
return new SpanSplitWithCountEnumerator<T>(source, delimiter, count);
3535
}
3636

3737
/// <summary>
3838
/// Splits a <see cref="ReadOnlySpan{Char}"/> into multiple ReadOnlySpans based on the specified <paramref name="delimiter"/> and the specified <paramref name="options"/>.
3939
/// </summary>
40-
/// <param name="span">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
41-
/// <param name="delimiter">A <see cref="char"/> that delimits the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
40+
/// <param name="source">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
41+
/// <param name="delimiter">A <see cref="char"/> that delimits the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
4242
/// <param name="options">A bitwise combination of the enumeration values that specifies whether to trim results and include empty results.</param>
4343
/// <returns>An instance of the ref struct <see cref="SpanSplitStringSplitOptionsEnumerator"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
44-
public static SpanSplitStringSplitOptionsEnumerator Split(this ReadOnlySpan<char> span, char delimiter, StringSplitOptions options)
44+
public static SpanSplitStringSplitOptionsEnumerator Split(this ReadOnlySpan<char> source, char delimiter, StringSplitOptions options)
4545
{
46-
return new SpanSplitStringSplitOptionsEnumerator(span, delimiter, options);
46+
return new SpanSplitStringSplitOptionsEnumerator(source, delimiter, options);
4747
}
4848

4949
/// <summary>
5050
/// Splits a <see cref="ReadOnlySpan{Char}"/> into at most <paramref name="count"/> ReadOnlySpans based on the specified <paramref name="delimiter"/> and the specified <paramref name="options"/>.
5151
/// </summary>
52-
/// <param name="span">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
53-
/// <param name="delimiter">A <see cref="char"/> that delimits the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
52+
/// <param name="source">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
53+
/// <param name="delimiter">A <see cref="char"/> that delimits the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
5454
/// <param name="count">The maximum number of sub-ReadOnlySpans to split into.</param>
5555
/// <param name="options">A bitwise combination of the enumeration values that specifies whether to trim results and include empty results.</param>
5656
/// <returns>An instance of the ref struct <see cref="SpanSplitAnyStringSplitOptionsWithCountEnumerator"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
57-
public static SpanSplitStringSplitOptionsWithCountEnumerator Split(this ReadOnlySpan<char> span, char delimiter, int count, StringSplitOptions options)
57+
public static SpanSplitStringSplitOptionsWithCountEnumerator Split(this ReadOnlySpan<char> source, char delimiter, int count, StringSplitOptions options)
5858
{
59-
return new SpanSplitStringSplitOptionsWithCountEnumerator(span, delimiter, count, options);
59+
return new SpanSplitStringSplitOptionsWithCountEnumerator(source, delimiter, count, options);
6060
}
6161

6262
/// <summary>
6363
/// Splits a <see cref="ReadOnlySpan{T}"/> into multiple ReadOnlySpans based on the any of the specified <paramref name="delimiters"/>.
6464
/// </summary>
6565
/// <typeparam name="T">The type of elements in the <see cref="ReadOnlySpan{T}"/>.</typeparam>
66-
/// <param name="span">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
67-
/// <param name="delimiters">A <see cref="ReadOnlySpan{T}"/> with the instances of <typeparamref name="T"/> that delimit the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
66+
/// <param name="source">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
67+
/// <param name="delimiters">A <see cref="ReadOnlySpan{T}"/> with the instances of <typeparamref name="T"/> that delimit the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
6868
/// <returns>An instance of the ref struct <see cref="SpanSplitAnyEnumerator{T}"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
69-
public static SpanSplitAnyEnumerator<T> SplitAny<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> delimiters) where T : IEquatable<T>
69+
public static SpanSplitAnyEnumerator<T> SplitAny<T>(this ReadOnlySpan<T> source, ReadOnlySpan<T> delimiters) where T : IEquatable<T>
7070
{
71-
return new SpanSplitAnyEnumerator<T>(span, delimiters);
71+
return new SpanSplitAnyEnumerator<T>(source, delimiters);
7272
}
7373

7474
/// <summary>
7575
/// Splits a <see cref="ReadOnlySpan{T}"/> into at most <paramref name="count"/> ReadOnlySpans based on the any of the specified <paramref name="delimiters"/>.
7676
/// </summary>
7777
/// <typeparam name="T">The type of elements in the <see cref="ReadOnlySpan{T}"/>.</typeparam>
78-
/// <param name="span">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
79-
/// <param name="delimiters">A <see cref="ReadOnlySpan{T}"/> with the instances of <typeparamref name="T"/> that delimit the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
78+
/// <param name="source">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
79+
/// <param name="delimiters">A <see cref="ReadOnlySpan{T}"/> with the instances of <typeparamref name="T"/> that delimit the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
8080
/// <param name="count">The maximum number of sub-ReadOnlySpans to split into.</param>
8181
/// <returns>An instance of the ref struct <see cref="SpanSplitAnyWithCountEnumerator{T}"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
82-
public static SpanSplitAnyWithCountEnumerator<T> SplitAny<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> delimiters, int count) where T : IEquatable<T>
82+
public static SpanSplitAnyWithCountEnumerator<T> SplitAny<T>(this ReadOnlySpan<T> source, ReadOnlySpan<T> delimiters, int count) where T : IEquatable<T>
8383
{
84-
return new SpanSplitAnyWithCountEnumerator<T>(span, delimiters, count);
84+
return new SpanSplitAnyWithCountEnumerator<T>(source, delimiters, count);
8585
}
8686

8787
/// <summary>
8888
/// Splits a <see cref="ReadOnlySpan{Char}"/> into multiple ReadOnlySpans based on the any of the specified <paramref name="delimiters"/>.
8989
/// </summary>
90-
/// <param name="span">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
91-
/// <param name="delimiters">A <see cref="ReadOnlySpan{Char}"/>, that delimit the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
90+
/// <param name="source">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
91+
/// <param name="delimiters">A <see cref="ReadOnlySpan{Char}"/>, that delimit the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
9292
/// <param name="options">A bitwise combination of the enumeration values that specifies whether to trim results and include empty results.</param>
9393
/// <returns>An instance of the ref struct <see cref="SpanSplitAnyStringSplitOptionsEnumerator"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
94-
public static SpanSplitAnyStringSplitOptionsEnumerator SplitAny(this ReadOnlySpan<char> span, ReadOnlySpan<char> delimiters, StringSplitOptions options)
94+
public static SpanSplitAnyStringSplitOptionsEnumerator SplitAny(this ReadOnlySpan<char> source, ReadOnlySpan<char> delimiters, StringSplitOptions options)
9595
{
96-
return new SpanSplitAnyStringSplitOptionsEnumerator(span, delimiters, options);
96+
return new SpanSplitAnyStringSplitOptionsEnumerator(source, delimiters, options);
9797
}
9898

9999
/// <summary>
100100
/// Splits a <see cref="ReadOnlySpan{Char}"/> into at most <paramref name="count"/> ReadOnlySpans based on the any of the specified <paramref name="delimiters"/>.
101101
/// </summary>
102-
/// <param name="span">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
103-
/// <param name="delimiters">A <see cref="ReadOnlySpan{Char}"/>, that delimit the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
102+
/// <param name="source">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
103+
/// <param name="delimiters">A <see cref="ReadOnlySpan{Char}"/>, that delimit the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
104104
/// <param name="count">The maximum number of sub-ReadOnlySpans to split into.</param>
105105
/// <param name="options">A bitwise combination of the enumeration values that specifies whether to trim results and include empty results.</param>
106106
/// <returns>An instance of the ref struct <see cref="SpanSplitAnyStringSplitOptionsWithCountEnumerator"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
107-
public static SpanSplitAnyStringSplitOptionsWithCountEnumerator SplitAny(this ReadOnlySpan<char> span, ReadOnlySpan<char> delimiters, int count, StringSplitOptions options)
107+
public static SpanSplitAnyStringSplitOptionsWithCountEnumerator SplitAny(this ReadOnlySpan<char> source, ReadOnlySpan<char> delimiters, int count, StringSplitOptions options)
108108
{
109-
return new SpanSplitAnyStringSplitOptionsWithCountEnumerator(span, delimiters, count, options);
109+
return new SpanSplitAnyStringSplitOptionsWithCountEnumerator(source, delimiters, count, options);
110110
}
111111

112112
/// <summary>
113113
/// Splits a <see cref="ReadOnlySpan{T}"/> into multiple ReadOnlySpans based on the specified <paramref name="delimiter"/>.
114114
/// </summary>
115115
/// <typeparam name="T">The type of elements in the <see cref="ReadOnlySpan{T}"/>.</typeparam>
116-
/// <param name="span">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
117-
/// <param name="delimiter">An instance of <see cref="ReadOnlySpan{T}"/> that delimits the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
116+
/// <param name="source">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
117+
/// <param name="delimiter">An instance of <see cref="ReadOnlySpan{T}"/> that delimits the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
118118
/// <returns>An instance of the ref struct <see cref="SpanSplitSequenceEnumerator{T}"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
119-
public static SpanSplitSequenceEnumerator<T> Split<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> delimiter) where T : IEquatable<T>
119+
public static SpanSplitSequenceEnumerator<T> Split<T>(this ReadOnlySpan<T> source, ReadOnlySpan<T> delimiter) where T : IEquatable<T>
120120
{
121-
return new SpanSplitSequenceEnumerator<T>(span, delimiter);
121+
return new SpanSplitSequenceEnumerator<T>(source, delimiter);
122122
}
123123

124124
/// <summary>
125125
/// Splits a <see cref="ReadOnlySpan{T}"/> into at most <paramref name="count"/> ReadOnlySpans based on the specified <paramref name="delimiter"/>.
126126
/// </summary>
127127
/// <typeparam name="T">The type of elements in the <see cref="ReadOnlySpan{T}"/>.</typeparam>
128-
/// <param name="span">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
129-
/// <param name="delimiter">An instance of <see cref="ReadOnlySpan{T}"/> that delimits the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
128+
/// <param name="source">The <see cref="ReadOnlySpan{T}"/> to be split.</param>
129+
/// <param name="delimiter">An instance of <see cref="ReadOnlySpan{T}"/> that delimits the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
130130
/// <param name="count">The maximum number of sub-ReadOnlySpans to split into.</param>
131131
/// <returns>An instance of the ref struct , which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
132-
public static SpanSplitSequenceWithCountEnumerator<T> Split<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> delimiter, int count) where T : IEquatable<T>
132+
public static SpanSplitSequenceWithCountEnumerator<T> Split<T>(this ReadOnlySpan<T> source, ReadOnlySpan<T> delimiter, int count) where T : IEquatable<T>
133133
{
134-
return new SpanSplitSequenceWithCountEnumerator<T>(span, delimiter, count);
134+
return new SpanSplitSequenceWithCountEnumerator<T>(source, delimiter, count);
135135
}
136136

137137
/// <summary>
138138
/// Splits a <see cref="ReadOnlySpan{Char}"/> into multiple ReadOnlySpans based on the specified <paramref name="delimiter"/>.
139139
/// </summary>
140-
/// <param name="span">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
141-
/// <param name="delimiter">An instance of <see cref="ReadOnlySpan{Char}"/> that delimits the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
140+
/// <param name="source">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
141+
/// <param name="delimiter">An instance of <see cref="ReadOnlySpan{Char}"/> that delimits the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
142142
/// <param name="options">A bitwise combination of the enumeration values that specifies whether to trim results and include empty results.</param>
143143
/// <returns>An instance of the ref struct <see cref="SpanSplitSequenceStringSplitOptionsEnumerator"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
144-
public static SpanSplitSequenceStringSplitOptionsEnumerator Split(this ReadOnlySpan<char> span, ReadOnlySpan<char> delimiter, StringSplitOptions options)
144+
public static SpanSplitSequenceStringSplitOptionsEnumerator Split(this ReadOnlySpan<char> source, ReadOnlySpan<char> delimiter, StringSplitOptions options)
145145
{
146-
return new SpanSplitSequenceStringSplitOptionsEnumerator(span, delimiter, options);
146+
return new SpanSplitSequenceStringSplitOptionsEnumerator(source, delimiter, options);
147147
}
148148

149149
/// <summary>
150150
/// Splits a <see cref="ReadOnlySpan{Char}"/> into at most <paramref name="count"/> ReadOnlySpans based on the specified <paramref name="delimiter"/>.
151151
/// </summary>
152-
/// <param name="span">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
153-
/// <param name="delimiter">An instance of <see cref="ReadOnlySpan{Char}"/> that delimits the various sub-ReadOnlySpans in <paramref name="span"/>.</param>
152+
/// <param name="source">The <see cref="ReadOnlySpan{Char}"/> to be split.</param>
153+
/// <param name="delimiter">An instance of <see cref="ReadOnlySpan{Char}"/> that delimits the various sub-ReadOnlySpans in <paramref name="source"/>.</param>
154154
/// <param name="count">The maximum number of sub-ReadOnlySpans to split into.</param>
155155
/// <param name="options">A bitwise combination of the enumeration values that specifies whether to trim results and include empty results.</param>
156156
/// <returns>An instance of the ref struct <see cref="SpanSplitSequenceStringSplitOptionsWithCountEnumerator"/>, which works the same way as every <see cref="IEnumerator"/> does and can be used in a foreach construct.</returns>
157-
public static SpanSplitSequenceStringSplitOptionsWithCountEnumerator Split(this ReadOnlySpan<char> span, ReadOnlySpan<char> delimiter, int count, StringSplitOptions options)
157+
public static SpanSplitSequenceStringSplitOptionsWithCountEnumerator Split(this ReadOnlySpan<char> source, ReadOnlySpan<char> delimiter, int count, StringSplitOptions options)
158158
{
159-
return new SpanSplitSequenceStringSplitOptionsWithCountEnumerator(span, delimiter, count, options);
159+
return new SpanSplitSequenceStringSplitOptionsWithCountEnumerator(source, delimiter, count, options);
160160
}
161161
}
162162
}

0 commit comments

Comments
 (0)