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