2 writes to Length
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Capture.cs (1)
31Length = length;
System\Text\RegularExpressions\Match.cs (1)
368Length = interval[1]; // the length of the match
58 references to Length
aspire (3)
src\Shared\ConsoleLogs\TimestampParser.cs (2)
22if (match.Index + match.Length >= span.Length) 28content = span[(match.Index + match.Length)..];
src\Shared\ConsoleLogs\UrlParser.cs (1)
35nextCharIndex = urlMatch.Index + urlMatch.Length;
Aspire.Dashboard (3)
src\Shared\ConsoleLogs\TimestampParser.cs (2)
22if (match.Index + match.Length >= span.Length) 28content = span[(match.Index + match.Length)..];
src\Shared\ConsoleLogs\UrlParser.cs (1)
35nextCharIndex = urlMatch.Index + urlMatch.Length;
Aspire.Hosting (2)
src\Shared\ConsoleLogs\TimestampParser.cs (2)
22if (match.Index + match.Length >= span.Length) 28content = span[(match.Index + match.Length)..];
cdac-build-tool (1)
ContractDescriptorSourceFileEmitter.cs (1)
100prevPos = match.Index + match.Length;
Microsoft.Build (7)
Evaluation\Expander.cs (7)
1176if (itemMetadataMatch.Groups[RegularExpressions.ItemSpecificationGroup].Length > 0) 3032ProjectErrorUtilities.VerifyThrowInvalidProject(groupCollection[RegularExpressions.ItemSpecificationGroup].Length == 0, elementLocation, "QualifiedMetadataInTransformNotAllowed", match.Value, name); 3431Length = match.Length; 3611prevat = match.Index + match.Length; 3632if (match.Index + match.Length != prevat) 3634list.Add(input.AsMemory().Slice(match.Index + match.Length, prevat - match.Index - match.Length));
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Synthesized\GeneratedNameParser.cs (1)
217if (s_fileTypeOrdinalPattern.Match(generatedName) is Match { Success: true, Groups: var groups, Index: var index, Length: var length })
Microsoft.CodeAnalysis.Workspaces (3)
PatternMatching\RegexPatternMatcher.cs (2)
71var kind = bestMatch.Length == candidate.Length && bestMatch.Index == 0 75var matchedSpan = GetMatchedSpan(bestMatch.Index, bestMatch.Length);
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
437Debug.Assert(renameText.Length == match.Length);
Microsoft.Data.Analysis (3)
TextFieldParser.cs (3)
103_delimiterLength += delimiterMatch.Length; 795index = matchResult.Index + matchResult.Length; 862index = delimiterMatch.Index + delimiterMatch.Length;
Microsoft.Data.Analysis.Tests (3)
src\Microsoft.Data.Analysis\TextFieldParser.cs (3)
103_delimiterLength += delimiterMatch.Length; 795index = matchResult.Index + matchResult.Length; 862index = delimiterMatch.Index + delimiterMatch.Length;
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (3)
911Index = MatchResult.Index + MatchResult.Length 980Index = DelimiterMatch.Index + DelimiterMatch.Length 1665m_DelimiterLength += DelimiterMatch.Length
Microsoft.Web.XmlTransform (4)
XmlTransforms.cs (4)
391position = match.Index + match.Length; 423position = match.Index + match.Length; 529position = match.Index + match.Length; 616position = match.Index + match.Length;
System.Data.Common (2)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
434if (!match.Success || (match.Length != connectionString.Length)) 436throw ADP.ConnectionStringSyntax(match.Length);
System.Data.Odbc (2)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
434if (!match.Success || (match.Length != connectionString.Length)) 436throw ADP.ConnectionStringSyntax(match.Length);
System.Data.OleDb (2)
DbConnectionOptions.cs (2)
787if (!match.Success || (match.Length != connectionString.Length)) 789throw ADP.ConnectionStringSyntax(match.Length);
System.Text.RegularExpressions (19)
System\Text\RegularExpressions\Capture.cs (4)
55public string Value => Text is string text ? text.Substring(Index, Length) : string.Empty; 59public ReadOnlySpan<char> ValueSpan => Text is string text ? text.AsSpan(Index, Length) : []; 75internal ReadOnlyMemory<char> GetRightSubstring() => Text is string text ? text.AsMemory(Index + Length, Text.Length - Index - Length) : ReadOnlyMemory<char>.Empty;
System\Text\RegularExpressions\Match.cs (2)
32/// the matched substring in the input string, and the <see cref="Capture.Length"/> property indicates 166r.RunSingleMatch(RegexRunnerMode.FullMatchRequired, Length, Text, _textbeg, _textend - _textbeg, _textpos)! :
System\Text\RegularExpressions\MatchCollection.cs (1)
213_prevlen = match.Length;
System\Text\RegularExpressions\Regex.cs (2)
661return (true, match.Index, match.Length, match._textpos); 727if (match.Length == 0)
System\Text\RegularExpressions\Regex.Replace.cs (3)
637state.prevat = match.Index + match.Length; 655state.segments.Add(state.input.AsMemory(match.Index + match.Length, state.prevat - match.Index - match.Length));
System\Text\RegularExpressions\Regex.Split.cs (3)
302state.prevat = match.Index + match.Length; 329state.results.Add(state.input.Substring(match.Index + match.Length, state.prevat - match.Index - match.Length));
System\Text\RegularExpressions\RegexReplacement.cs (4)
242state.prevat = match.Index + match.Length; 305state.prevat = match.Index + match.Length; 324state.segments.Add(state.inputMemory.Slice(match.Index + match.Length, state.prevat - match.Index - match.Length));