2 writes to Index
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Capture.cs (1)
15
Index
= index;
System\Text\RegularExpressions\Match.cs (1)
283
Index
= interval[0] + beginningOfSpanSlice; // the index of the match, adjusted for input slicing
54 references to Index
Aspire.Dashboard (8)
ConsoleLogs\TimestampParser.cs (4)
23
var timestamp = span[match.
Index
..(match.
Index
+ match.Length)];
24
var theRest = match.
Index
+ match.Length >= span.Length ? "" : span[(match.
Index
+ match.Length)..];
ConsoleLogs\UrlParser.cs (4)
25
if (urlMatch.
Index
> 0)
27
builder.Append(text[(nextCharIndex)..urlMatch.
Index
]);
30
var urlStart = urlMatch.
Index
;
31
nextCharIndex = urlMatch.
Index
+ urlMatch.Length;
dotnet-svcutil-lib (5)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (5)
116
matchPos = m.
Index
;
126
matchPos = m.
Index
;
222
matchPos = m.
Index
- 1;
256
matchPos = m.
Index
- 1;
274
matchPos = m.
Index
- 1;
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (1)
79
matches.Add((namedSpanStartMatch.
Index
, namedSpanStartMatch.Value));
Microsoft.Build.Tasks.UnitTests (2)
ResourceHandling\GenerateResource_Tests.cs (2)
3777
string segment = unformattedMessage.Substring(i, match.
Index
- i);
3781
i = match.
Index
+ match.Length;
Microsoft.DotNet.VersionTools (2)
Dependencies\FileRegexUpdater.cs (2)
77
int startIndex = group.
Index
- m.
Index
;
Microsoft.DotNet.VersionTools.Tasks (2)
UpdateToRemoteDependencies.cs (2)
114
.Remove(g.
Index
, g.Length)
115
.Insert(g.
Index
, newValue);
Microsoft.VisualBasic.Core (4)
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (4)
911
Index = MatchResult.
Index
+ MatchResult.Length
971
Field = Line.Substring(Index, DelimiterMatch.
Index
- Index)
980
Index = DelimiterMatch.
Index
+ DelimiterMatch.Length
1651
Limit = DelimiterMatch.
Index
- 1
System.Private.Xml (3)
System\Xml\XmlConvert.cs (3)
196
matchPos = m.
Index
- 1;
229
matchPos = m.
Index
- 1;
244
matchPos = m.
Index
- 1;
System.Text.RegularExpressions (23)
System\Text\RegularExpressions\Capture.cs (5)
30
public string Value => Text is string text ? text.Substring(
Index
, Length) : string.Empty;
34
public ReadOnlySpan<char> ValueSpan => Text is string text ? text.AsSpan(
Index
, Length) : [];
40
internal ReadOnlyMemory<char> GetLeftSubstring() => Text is string text ? text.AsMemory(0,
Index
) : ReadOnlyMemory<char>.Empty;
43
internal ReadOnlyMemory<char> GetRightSubstring() => Text is string text ? text.AsMemory(
Index
+ Length, Text.Length -
Index
- Length) : ReadOnlyMemory<char>.Empty;
System\Text\RegularExpressions\Regex.cs (1)
509
return (true, match.
Index
, match.Length, match._textpos);
System\Text\RegularExpressions\Regex.Replace.cs (5)
183
state.segments.Add(state.input.AsMemory(state.prevat, match.
Index
- state.prevat));
184
state.prevat = match.
Index
+ match.Length;
202
state.segments.Add(state.input.AsMemory(match.
Index
+ match.Length, state.prevat - match.
Index
- match.Length));
203
state.prevat = match.
Index
;
System\Text\RegularExpressions\Regex.Split.cs (5)
95
state.results.Add(state.input.Substring(state.prevat, match.
Index
- state.prevat));
96
state.prevat = match.
Index
+ match.Length;
123
state.results.Add(state.input.Substring(match.
Index
+ match.Length, state.prevat - match.
Index
- match.Length));
124
state.prevat = match.
Index
;
System\Text\RegularExpressions\RegexReplacement.cs (7)
242
state.segments.Add(match.
Index
- state.prevat);
245
state.prevat = match.
Index
+ match.Length;
307
state.segments.Add(state.inputMemory.Slice(state.prevat, match.
Index
- state.prevat));
308
state.prevat = match.
Index
+ match.Length;
327
state.segments.Add(state.inputMemory.Slice(match.
Index
+ match.Length, state.prevat - match.
Index
- match.Length));
328
state.prevat = match.
Index
;
xunit.assert (4)
StringAsserts.cs (4)
536
var formattedActual = AssertHelper.ShortenAndEncodeString(actualString, match.
Index
, out pointerIndent);
538
throw DoesNotMatchException.ForMatch(formattedExpected, match.
Index
, pointerIndent, formattedActual);
566
var formattedActual = AssertHelper.ShortenAndEncodeString(actualString, match.
Index
, out pointerIndent);
568
throw DoesNotMatchException.ForMatch(formattedExpected, match.
Index
, pointerIndent, formattedActual);