2 writes to Length
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Capture.cs (1)
16Length = length;
System\Text\RegularExpressions\Match.cs (1)
282Length = interval[1]; // the length of the match
58 references to Length
Aspire.Dashboard (4)
ConsoleLogs\TimestampParser.cs (3)
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 (1)
31nextCharIndex = urlMatch.Index + urlMatch.Length;
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
222if (match.Groups[4].Length > 0)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
222if (match.Groups[4].Length > 0)
Microsoft.Build (2)
Evaluation\Expander.cs (2)
1083if (itemMetadataMatch.Groups[RegularExpressions.ItemSpecificationGroup].Length > 0) 3057ProjectErrorUtilities.VerifyThrowInvalidProject(match.Groups[RegularExpressions.ItemSpecificationGroup].Length == 0, _elementLocation, "QualifiedMetadataInTransformNotAllowed", match.Value, name);
Microsoft.Build.Conversion.Core (1)
ProjectFileConverter.cs (1)
959return result.Remove(0, m.Length);
Microsoft.Build.Engine (11)
Engine\Expander.cs (1)
1938if (itemMetadataMatch.Groups["ITEM_SPECIFICATION"].Length > 0)
Engine\TargetDependencyAnalyzer.cs (1)
787(itemVectorMatch.Groups["TRANSFORM_SPECIFICATION"].Length == 0))
Items\ItemExpander.cs (4)
208if (itemVectorMatch.Groups["SEPARATOR_SPECIFICATION"].Length > 0) 274string transform = (itemVector.Groups["TRANSFORM_SPECIFICATION"].Length > 0) 350string separator = (itemVector.Groups["SEPARATOR_SPECIFICATION"].Length != 0) 391ProjectErrorUtilities.VerifyThrowInvalidProject(itemMetadataMatch.Groups["ITEM_SPECIFICATION"].Length == 0,
Shared\FileUtilities.cs (5)
413ErrorUtilities.VerifyThrow((modifiedItemSpec.Length > root.Length) && IsSlash(modifiedItemSpec[root.Length]), 416modifiedItemSpec = modifiedItemSpec.Substring(root.Length + 1); 618if ((drive.Success && (drive.Length == fileSpec.Length)) || 619(UNCShare.Success && (UNCShare.Length == fullPath.Length)))
Microsoft.Build.Engine.UnitTests (10)
Evaluation\ExpressionShredder_Tests.cs (2)
623Assert.Equal(0, transformGroup.Length); 1176if (embeddedMetadataReference.Groups["ITEM_SPECIFICATION"].Length > 0)
FileUtilitiesRegex_Tests.cs (8)
201match.Length.ShouldBe(13); 205match.Length.ShouldBe(13); 267match.Length.ShouldBe(13); 271match.Length.ShouldBe(13); 322match.Length.ShouldBe(9); 326match.Length.ShouldBe(9); 387match.Length.ShouldBe(9); 391match.Length.ShouldBe(9);
Microsoft.Build.Tasks.UnitTests (1)
ResourceHandling\GenerateResource_Tests.cs (1)
3781i = match.Index + match.Length;
Microsoft.DotNet.VersionTools (1)
Dependencies\FileRegexUpdater.cs (1)
81.Remove(startIndex, group.Length)
Microsoft.DotNet.VersionTools.Tasks (1)
UpdateToRemoteDependencies.cs (1)
114.Remove(g.Index, g.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
System.Data.Common (2)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
444if (!match.Success || (match.Length != connectionString.Length)) 446throw ADP.ConnectionStringSyntax(match.Length);
System.Data.Odbc (2)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
444if (!match.Success || (match.Length != connectionString.Length)) 446throw ADP.ConnectionStringSyntax(match.Length);
System.Text.RegularExpressions (18)
System\Text\RegularExpressions\Capture.cs (4)
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) : []; 43internal ReadOnlyMemory<char> GetRightSubstring() => Text is string text ? text.AsMemory(Index + Length, Text.Length - Index - Length) : ReadOnlyMemory<char>.Empty;
System\Text\RegularExpressions\Match.cs (1)
103r.RunSingleMatch(RegexRunnerMode.FullMatchRequired, Length, Text, _textbeg, _textend - _textbeg, _textpos)! :
System\Text\RegularExpressions\MatchCollection.cs (1)
100_prevlen = match.Length;
System\Text\RegularExpressions\Regex.cs (2)
509return (true, match.Index, match.Length, match._textpos); 575if (match.Length == 0)
System\Text\RegularExpressions\Regex.Replace.cs (3)
184state.prevat = match.Index + match.Length; 202state.segments.Add(state.input.AsMemory(match.Index + match.Length, state.prevat - match.Index - match.Length));
System\Text\RegularExpressions\Regex.Split.cs (3)
96state.prevat = match.Index + match.Length; 123state.results.Add(state.input.Substring(match.Index + match.Length, state.prevat - match.Index - match.Length));
System\Text\RegularExpressions\RegexReplacement.cs (4)
245state.prevat = match.Index + match.Length; 308state.prevat = match.Index + match.Length; 327state.segments.Add(state.inputMemory.Slice(match.Index + match.Length, state.prevat - match.Index - match.Length));