1381 references to Substring
aspire (4)
Commands\ConfigCommand.cs (1)
282.Select(kvp => kvp.Key.Substring(featurePrefix.Length))
Commands\DashboardRunCommand.cs (1)
328result = arg.Substring(prefix.Length);
Diagnostics\CliLogFormat.cs (1)
90return lastDotIndex >= 0 ? categoryName.Substring(lastDotIndex + 1) : categoryName;
Projects\FallbackProjectParser.cs (1)
207var version = trimmedSdk.Substring(sdkPrefix.Length + 1);
Aspire.Azure.Messaging.EventHubs (1)
EventHubsComponent.cs (1)
79var slug = Guid.NewGuid().ToString().Substring(24);
Aspire.Azure.Messaging.ServiceBus (1)
AzureMessagingServiceBusSettings.cs (1)
147SubscriptionName = entityPath.Substring(subscriptionsIndex + subscriptionsSegment.Length);
Aspire.Cli.Tests (1)
Commands\McpIconHelperTests.cs (1)
34var base64Part = icon.Source.Substring("data:image/png;base64,".Length);
Aspire.Dashboard (8)
Components\Controls\Chart\ChartContainer.razor.cs (1)
495var id = newTab.Id?.Substring("tab-".Length);
Components\Dialogs\GenAIVisualizerDialog.razor.cs (2)
204var id = newTab.Id?.Substring("tab-overview-".Length); 223var id = newTab.Id?.Substring("tab-message-".Length);
Components\Pages\Resources.razor.cs (1)
840var id = newTab.Id?.Substring("tab-".Length);
Otlp\Storage\ResourceKey.cs (2)
25return new ResourceKey(name, instanceId.Substring(name.Length + 1)); 37return new ResourceKey(Name: instanceId.Substring(0, separator), InstanceId: instanceId.Substring(separator + 1));
Utils\DashboardUIHelpers.cs (1)
158var queryString = url.Substring(questionMarkIndex);
Utils\VersionHelpers.cs (1)
29return description.Substring(lastSpace + 1);
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
224InfoTable = ProjectInfo.Parse(line.Substring("$ENDPOINTS: ".Length));
Aspire.Hosting (1)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
156var relativePath = file.Substring(fullPath.Length + 1);
Aspire.Hosting.CodeGeneration.Python (1)
AtsPythonCodeGenerator.cs (1)
692methodName = char.ToUpper(methodName[0]) + methodName.Substring(1);
Aspire.Hosting.EntityFrameworkCore (1)
EFCoreOperationExecutor.cs (1)
111var version = frameworkName.Substring(versionIndex + versionPrefix.Length);
Aspire.Hosting.Garnet.Tests (1)
AddGarnetTests.cs (1)
316Assert.DoesNotContain("--checkpointdir", args.Substring(saveIndex + 1));
Aspire.Hosting.Integration.Analyzers (6)
AspireExportAnalyzer.cs (6)
658? char.ToUpperInvariant(methodNameOverride[0]) + methodNameOverride.Substring(1) 831var expectedDefault = char.ToLowerInvariant(method.Name[0]) + method.Name.Substring(1); 848shortName = shortName.Substring("Azure".Length); 851var suggestedName = $"with{shortName}{method.Name.Substring(4)}"; // e.g., "withSearchRoleAssignments" 1798var camelCaseName = char.ToLowerInvariant(method.Name[0]) + method.Name.Substring(1); 1824: char.ToLowerInvariant(name[0]) + name.Substring(1);
Aspire.Hosting.JavaScript (1)
JavaScriptHostingExtensions.cs (1)
2639cleaned = cleaned.Substring(op.Length).TrimStart();
Aspire.Hosting.Kubernetes (1)
KubernetesPublishingContext.cs (1)
393resourceName = resourceName.Substring(baseName.Length + 1); // +1 for the hyphen
Aspire.Hosting.Redis.Tests (1)
AddRedisTests.cs (1)
656Assert.DoesNotContain("--save", args.Substring(saveIndex + 1));
Aspire.Hosting.Valkey.Tests (1)
AddValkeyTests.cs (1)
306Assert.DoesNotContain("--save", args.Substring(saveIndex + 1));
Aspire.Templates.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
224InfoTable = ProjectInfo.Parse(line.Substring("$ENDPOINTS: ".Length));
Client.ExpectedExceptions.IntegrationTests (1)
ExpectedExceptionTests.4.1.0.cs (1)
97string uniqueIdentifier = restartServiceAddress.Substring(restartServiceAddress.LastIndexOf("/") + 1);
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\Specs\TypeIndex.cs (2)
122displayString = displayString.Substring(GlobalPrefix.Length); 128displayString = char.ToUpperInvariant(displayString[0]) + displayString.Substring(1);
crossgen2 (2)
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (1)
198string rspFileName = arg.Substring(1);
src\runtime\src\coreclr\tools\Common\InstructionSetHelpers.cs (1)
205instructionSet = instructionSetSpecifier.Substring(1);
Crossgen2Tasks (2)
CommonFilePulledFromSdkRepo\Logger.cs (1)
94format = format.Substring(12);
ResolveReadyToRunCompilers.cs (1)
259string architectureStr = runtimeIdentifier.Substring(separator + 1).ToLowerInvariant();
csc (2)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (2)
148return @"\\" + s.Substring(8); 150return s.Substring(4);
CSharpSyntaxGenerator (1)
AbstractFileWriter.cs (1)
270name = char.ToLowerInvariant(name[0]) + name.Substring(1);
dotnet (17)
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (3)
37new ToolCommandName(arguments.CommandName.Substring(LeadingDotnetPrefix.Length)), allowRollForward); 50string.IsNullOrWhiteSpace(arguments.CommandName.Substring(LeadingDotnetPrefix.Length))) 58new ToolCommandName(arguments.CommandName.Substring(LeadingDotnetPrefix.Length)));
Commands\Test\MTP\TestModulesFilterHandler.cs (1)
134var excludePattern = pattern.Substring(1).TrimStart();
Commands\Test\VSTest\TestCommand.cs (2)
353propertyName = propertyKeyValue.key.RemovePrefix().Substring("property:".Length); 358propertyName = propertyKeyValue.key.RemovePrefix().Substring("p:".Length);
Commands\Tool\Install\ProjectRestorer.cs (1)
83line = line.Substring(project.Value.Length + 3);
Commands\Workload\WorkloadUtilities.cs (2)
32var modifiedFirst = new ReleaseVersion(1, 1, 1, firstDash == first.Length ? null : first.Substring(firstDash)); 33var modifiedSecond = new ReleaseVersion(1, 1, 1, secondDash == second.Length ? null : second.Substring(secondDash));
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26425.101\contentFiles\cs\net11.0\NativeMethods.cs (2)
148return @"\\" + s.Substring(8); 150return s.Substring(4);
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
112return !string.IsNullOrEmpty(targetFrameworkVersion) && Version.TryParse(targetFrameworkVersion.Substring(1), out var version) ? version : null;
src\sdk\src\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs (5)
20return next == -1 ? ids.Substring(idStart) : ids.Substring(idStart, next - idStart); 186if (!ValidIdentifier(ids.Substring(idStart), buildMeta)) 257if (!int.TryParse(fxVersionString.Substring(patchStart), out patch)) 284string pre = (preSeparator == -1) ? fxVersionString.Substring(preStart) : fxVersionString.Substring(preStart, preSeparator - preStart); 294build = fxVersionString.Substring(preSeparator);
dotnet-aot (6)
src\sdk\src\Cli\dotnet\CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (3)
37new ToolCommandName(arguments.CommandName.Substring(LeadingDotnetPrefix.Length)), allowRollForward); 50string.IsNullOrWhiteSpace(arguments.CommandName.Substring(LeadingDotnetPrefix.Length))) 58new ToolCommandName(arguments.CommandName.Substring(LeadingDotnetPrefix.Length)));
src\sdk\src\Cli\dotnet\Commands\Workload\WorkloadUtilities.cs (2)
32var modifiedFirst = new ReleaseVersion(1, 1, 1, firstDash == first.Length ? null : first.Substring(firstDash)); 33var modifiedSecond = new ReleaseVersion(1, 1, 1, secondDash == second.Length ? null : second.Substring(secondDash));
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
112return !string.IsNullOrEmpty(targetFrameworkVersion) && Version.TryParse(targetFrameworkVersion.Substring(1), out var version) ? version : null;
dotnet-dev-certs (5)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
69var text = message.Substring(escapeScan);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
160longOption = arg.Substring(2).Split(new[] { ':', '=' }, 2); 164shortOption = arg.Substring(1).Split(new[] { ':', '=' }, 2);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
22LongName = part.Substring(2); 26var optName = part.Substring(1);
dotnet-getdocument (5)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
69var text = message.Substring(escapeScan);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
160longOption = arg.Substring(2).Split(new[] { ':', '=' }, 2); 164shortOption = arg.Substring(1).Split(new[] { ':', '=' }, 2);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
22LongName = part.Substring(2); 26var optName = part.Substring(1);
dotnet-Microsoft.XmlSerializer.Generator (4)
Sgen.cs (4)
430arg = arg.Substring(2); 441arg = arg.Substring(1); 498Console.Out.WriteLine(SR.Format(SR.HelpUsage, this.GetType().Assembly.GetName().Name.Substring("dotnet-".Length))); 688parsedArgs.Add(line.Substring(i + 1));
dotnet-openapi (5)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
69var text = message.Substring(escapeScan);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
160longOption = arg.Substring(2).Split(new[] { ':', '=' }, 2); 164shortOption = arg.Substring(1).Split(new[] { ':', '=' }, 2);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
22LongName = part.Substring(2); 26var optName = part.Substring(1);
dotnet-razorpagegenerator (1)
Program.cs (1)
99var viewDirPath = viewDir.Substring(targetProjectDirectory.Length).Replace('\\', '/');
dotnet-sourcelink (2)
dotnet-sql-cache (5)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
69var text = message.Substring(escapeScan);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
160longOption = arg.Substring(2).Split(new[] { ':', '=' }, 2); 164shortOption = arg.Substring(1).Split(new[] { ':', '=' }, 2);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
22LongName = part.Substring(2); 26var optName = part.Substring(1);
dotnet-suggest (3)
SuggestionDispatcher.cs (3)
194yield return "dotnet " + fileNameWithoutExtension.Substring("dotnet-".Length); 247choppedCommandLine = commandLine.Substring(i); 277commandLine = commandLine.Substring(targetExeName.Length + 1);
dotnet-svcutil-lib (81)
CodeDomFixup\StringHelpers.cs (1)
13return s.StartsWith(prefix, StringComparison.Ordinal) ? s.Substring(prefix.Length) : s;
CommandLineParser.cs (4)
40this.Name = name.Substring(FullSwitchIndicator.Length); 49this.Abbreviation = abbreviation.Substring(AbbreviationSwitchIndicator.Length); 92otherName = other.Substring(FullSwitchIndicator.Length).ToLowerInvariant(); 97otherName = other.Substring(AbbreviationSwitchIndicator.Length).ToLowerInvariant();
FrameworkFork\Microsoft.CodeDom\Compiler\RedistVersionInfo.cs (1)
57String versionWithoutV = versionVal.Substring(1);
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (2)
3631value = value.Substring(1); 3785sb.Append(CreateEscapedIdentifier(baseType.Substring(lastIndex)));
FrameworkFork\Microsoft.CodeDom\Microsoft\VBCodeProvider.cs (2)
1258Output.Write(typeName.Substring(index + 1)); 3106sb.Append(CreateEscapedIdentifier(baseType.Substring(lastIndex)));
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (1)
1949lnameStr = _xnt.Add(prefixStr.Substring(6));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlCharCheckingWriter.cs (1)
189text = text.Substring(i + 2);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (2)
5932_curNode.SetValue(_curNode.StringValue.Substring(_readValueOffset)); 5948_curNode.SetValue(_curNode.StringValue.Substring(_readValueOffset));
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNode.cs (1)
1276localName = name.Substring(colonPos + 1);
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (2)
296_nameTable.Add(docTypeName.Substring(colonPos + 1))); 1507Throw(_curPos - systemId.Length - 1, ResXml.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (1)
980name = name.Substring(idx + 1);
FrameworkFork\Microsoft.Xml\Xml\schema\Inference\infer.cs (1)
1791if (s.Substring(i) == "INF")
FrameworkFork\Microsoft.Xml\Xml\schema\XdrBuilder.cs (1)
530Uri ruri = _xmlResolver.ResolveUri(_baseUri, uri.Substring(x_schema.Length));
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (1)
337string url = uri.Substring(x_schema.Length);
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifier.cs (3)
43return char.ToUpperInvariant(identifier[0]).ToString() + identifier.Substring(1); 58return char.ToLowerInvariant(identifier[0]).ToString() + identifier.Substring(1); 191int arguments = Int32.Parse(name.Substring(nameEnd + 1), CultureInfo.InvariantCulture) + index;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (2)
116return new XmlQualifiedName(XmlConvert.EncodeLocalName(name.Substring(colon + 1)), XmlConvert.EncodeLocalName(name.Substring(0, colon))).ToString(); 238Name = Name.Substring("xml:".Length);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (1)
1417dims = type.Substring(nameLen);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (2)
1999string choiceName = colon < 0 ? xmlName : xmlName.Substring(colon + 1); 2121string choiceName = colon < 0 ? choiceId : choiceId.Substring(colon + 1);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (2)
572System.Diagnostics.Debug.Assert(memberInfos.ContainsKey(source.Substring(3))); 573MemberInfo memInfo = memberInfos[source.Substring(3)];
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (4)
819attr.Value = _r.LookupNamespace(attr.Value.Substring(0, colon)) + ":" + attr.Value.Substring(colon + 1); 1203string localName = value.Substring(colon + 1); 1521fixupReference = href.Substring(1); 2005xsiTypeName = (colon >= 0) ? value.Substring(colon + 1) : value;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (4)
560Int64 index = Int64.Parse(name.Substring(prefixLength), CultureInfo.InvariantCulture); 983_w.WriteAttributeString(prefix, localName.Substring(colon + 1), ns, value); 1017_w.WriteStartAttribute(prefix, localName.Substring(colon + 1), ns); 3681string choiceName = colon < 0 ? xmlName : xmlName.Substring(colon + 1);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
2395string choiceName = colon < 0 ? xmlName : xmlName.Substring(colon + 1); 2601Debug.Assert(initValue.MemberInfo.Name == initValue.Arg.Substring(3));
FrameworkFork\Microsoft.Xml\Xml\ValidateNames.cs (1)
314localName = s.Substring(colonOffset + 1);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\StringFunctions.cs (2)
162return (idx < 0) ? string.Empty : s1.Substring(idx + s2.Length); 202return str1.Substring((int)num);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (2)
474string nestedTypeName = XmlConvert.DecodeName(originalName.Substring(nestedTypeIndex + 1)); 1434AddToNamespace(builder, uriString.Substring(Globals.DataContractXsdBaseNamespace.Length), fragments);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (5)
1676typeName = DataContract.GetClrTypeFullName(type).Substring(nsLen).Replace('+', '.'); 1743localName.Append(typeName.Substring(startIndex)); 1757nestedParamCounts.Add(Int32.Parse(typeName.Substring(endIndex + 1), CultureInfo.InvariantCulture)); 1827localName = fullTypeName.Substring(nsEnd + 1).Replace('+', '.'); 1836return uriString.StartsWith(Globals.DataContractXsdBaseNamespace, StringComparison.Ordinal) ? uriString.Substring(Globals.DataContractXsdBaseNamespace.Length) : uriString;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (1)
458name = qname.Substring(colon + 1);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (3)
559localName = name.Substring(index + 1); 1036localName = name.Substring(index + 1); 1169_value = value.Substring(actual);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (1)
495localName = Trim(qname.Substring(index + 1));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\UrlUtility.cs (2)
48query = query.Substring(1); 75return UrlPathEncode(str.Substring(0, i)) + str.Substring(i);
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\WSSecurityJan2004.cs (1)
423SecurityKeyIdentifierClause clause = new LocalIdKeyIdentifierClause(uri.Substring(1), derivationNonce, derivationLength, tokenTypes);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BindingContext.cs (1)
132builder.Append(typeString.Substring(typeString.LastIndexOf('.') + 1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelRequirements.cs (2)
277contractChannelTypes.Append(typeString.Substring(typeString.LastIndexOf('.') + 1)); 321bindingChannelTypes.Append(typeString.Substring(typeString.LastIndexOf('.') + 1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
633uriBuilder.Query = requestProperty.QueryString.Substring(1);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (1)
306return query.Length > 0 ? query.Substring(1) : string.Empty;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TextMessageEncoder.cs (1)
193charSet = contentType.Substring(charsetValueIndex);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ClientClassGenerator.cs (1)
938return interfaceName.Substring(1);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (1)
160_defaultName = _method.Name.Substring(5);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (2)
40return baseUri + (path.StartsWith("/", StringComparison.Ordinal) ? path.Substring(1) : path); 927return method.Name.Substring(BeginMethodNamePrefix.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ReferenceList.cs (1)
127return uri.Substring(1);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy.cs (1)
2978message.Substring(message.Length - (MaxLength - Ellipsis.Length) / 2));
FrameworkFork\System.ServiceModel\System\ServiceModel\XmlUtil.cs (2)
75return s.Substring(i); 117localName = TrimEnd(qname.Substring(index + 1));
Metadata\HttpAuthenticationHelper.cs (3)
102realm = GetRealmFromChallenge(challenge.Substring(spaceIndex + 1).Trim()); 147string value = challenge.Substring(realmTokenStart.Length); 172challenge = challenge.Substring(i + 1);
Metadata\MetadaExchangeResolver.cs (1)
460return paramDecl.Substring(equals + 1).Trim(new char[] { ' ', '\'', '\"', '\t' });
Shared\FrameworkInfo.cs (1)
53string versionString = fullFrameworkName.Substring(i);
Shared\MSBuildProj.cs (1)
426elementStr = elementStr.Substring(2).TrimEnd(')');
Shared\Utilities\LogTag.cs (1)
69value = message.Substring(tag.Length);
Shared\Utilities\PathHelper.cs (1)
186string str = childDir.Name.Substring(directoryName.Length);
dotnet-svcutil-lib.Tests (1)
TestInit.cs (1)
576g_SvcutilPkgVersion = nugetId.Substring("dotnet-svcutil-lib.".Length);
dotnet-svcutil.xmlserializer (7)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (7)
31name = name.Substring(2); 36abbreviation = abbreviation.Substring(1); 65other = other.Substring(2); 67other = other.Substring(1); 180arg = arg.Substring(1); 182arg = arg.Substring(2); 196argValue = arg.Substring(delim + 1);
dotnet-user-jwts (6)
Helpers\ConsoleTable.cs (1)
123rows[i][j] = rows[i][j].Substring(columnLengths[j]);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
69var text = message.Substring(escapeScan);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
160longOption = arg.Substring(2).Split(new[] { ':', '=' }, 2); 164shortOption = arg.Substring(1).Split(new[] { ':', '=' }, 2);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
22LongName = part.Substring(2); 26var optName = part.Substring(1);
dotnet-user-secrets (5)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
69var text = message.Substring(escapeScan);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
160longOption = arg.Substring(2).Split(new[] { ':', '=' }, 2); 164shortOption = arg.Substring(1).Split(new[] { ':', '=' }, 2);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
22LongName = part.Substring(2); 26var optName = part.Substring(1);
GenerateDocumentationAndConfigFiles (10)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (4)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 750var replacement = replacementPrefix + filePath.Substring(oldPrefix.Length); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
GetDocument.Insider (5)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
69var text = message.Substring(escapeScan);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
160longOption = arg.Substring(2).Split(new[] { ':', '=' }, 2); 164shortOption = arg.Substring(1).Split(new[] { ':', '=' }, 2);
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
22LongName = part.Substring(2); 26var optName = part.Substring(1);
ILAssembler (2)
GrammarVisitor.cs (1)
1123? typeFullName.Substring(typeFullNameLastDot)
NameHelpers.cs (1)
28? dottedName.Substring(lastDotIndex + 1)
ilc (5)
ConfigurablePInvokePolicy.cs (2)
59string entrypointName = entry.Substring(separator + 1); 102yield return name.Substring(LibPrefix.Length);
Program.cs (1)
256compilationRoots.Add(new MainMethodRootProvider(module, null, generateLibraryAndModuleInitializers: false, specifier.Substring(separatorIndex + 1)));
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (1)
198string rspFileName = arg.Substring(1);
src\runtime\src\coreclr\tools\Common\InstructionSetHelpers.cs (1)
205instructionSet = instructionSetSpecifier.Substring(1);
ILCompiler.Compiler (6)
Compiler\AssemblyExtensions.cs (1)
32var versionStr = tfm.Substring(idx + versionPrefix.Length);
Compiler\Logging\DocumentationSignatureParser.cs (2)
539namepart = name.Substring(indexOfLastDot + 1); 791name = id.Substring(index);
Compiler\RuntimeConfigurationRootProvider.cs (1)
79string value = line.Substring(indexOfEquals + 1);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (1)
663name = name.Substring(lastDot + 1);
src\runtime\src\coreclr\tools\Common\Compiler\ProcessLinkerXmlBase.cs (1)
830name = fullName.Substring(last_dot + 1);
ILCompiler.ReadyToRun (4)
Compiler\CallChainProfile.cs (1)
183methodNameWithoutType = unresolvedNamespaceTypeAndMethodName.Length > lastDotIndex ? unresolvedNamespaceTypeAndMethodName.Substring(lastDotIndex + 1) : "";
Compiler\ReadyToRunCodegenCompilationBuilder.cs (1)
85string value = param.Substring(indexOfEquals + 1);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (1)
663name = name.Substring(lastDot + 1);
src\runtime\src\coreclr\tools\Common\Compiler\ProcessLinkerXmlBase.cs (1)
830name = fullName.Substring(last_dot + 1);
ILCompiler.RyuJit (1)
Compiler\RyuJitCompilationBuilder.cs (1)
73string value = param.Substring(indexOfEquals + 1);
illink (11)
ILLink.RoslynAnalyzer (1)
TrimAnalysis\ParameterProxy.cs (1)
80public partial bool IsTypeOf(string typeName) => ParameterType.IsTypeOf(typeName.Substring(0, typeName.LastIndexOf('.')), typeName.Substring(1 + typeName.LastIndexOf('.')));
ILLink.Tasks (2)
CreateRuntimeRootDescriptorFile.cs (2)
526classNamespace = classNamespace.Substring(prefixToRemove.Length); 602string defineName = line.Substring(ifdefLength);
Infrastructure.Common (2)
JsonSerializer.cs (1)
44string value = pair.Substring(colonPos + 1).Replace("\"", String.Empty).Trim();
ServiceUtilHelper.cs (1)
504string path = serviceUri.Substring(pathSeparatorIndex);
Infrastructure.Tests (1)
PowerShellScripts\DownloadNativeArchivesTests.cs (1)
664var rest = path.Substring(i + marker.Length);
Microsoft.Analyzers.Extra (2)
LegacyLoggingFixer.FixDetails.cs (2)
82argName = (char)(firstChar + ('a' - 'A')) + argName.Substring(1); 125Level = method.Name.Substring("Log".Length);
Microsoft.Analyzers.Local (2)
Utils.cs (2)
26var constraintsPart = typeSignature.Substring(whereClauseIndex); 35var constraintValues = clause.Substring(colonIndex + 1);
Microsoft.AspNetCore.Authentication.Cookies (1)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
22var segment = new PathString(contentPath.Substring(1));
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
86token = authorization.Substring("Bearer ".Length).Trim();
Microsoft.AspNetCore.Authentication.Negotiate (3)
Internal\LdapAdapter.cs (2)
94var groupCN = DistinguishedNameSeparatorRegex.Split(groupDN)[0].Substring("CN=".Length); 158var nestedGroupCN = DistinguishedNameSeparatorRegex.Split(nestedGroupDN)[0].Substring("CN=".Length);
NegotiateHandler.cs (1)
114token = authorization.Substring(AuthHeaderPrefix.Length).Trim();
Microsoft.AspNetCore.Components (7)
NavigationManager.cs (2)
330return uri.Substring(_baseUri.OriginalString.Length); 343return uri.Substring(_baseUri.OriginalString.Length - 1);
src\aspnetcore\src\Http\Routing\src\Patterns\RoutePatternMatcher.cs (1)
252var captured = requestSegment.Buffer.Substring(requestSegment.Offset);
src\aspnetcore\src\Http\Routing\src\Patterns\RoutePatternParser.cs (4)
461return routePattern.Substring(2); 465return routePattern.Substring(1); 558_template.Substring(_index); 562return string.Concat(_template.Substring(0, _index), "|", _template.Substring(_index));
Microsoft.AspNetCore.Components.AI.SourceGenerators (1)
ToolBlockEmitter.cs (1)
259=> propertyName.Substring(0, 1).ToLowerInvariant() + propertyName.Substring(1);
Microsoft.AspNetCore.Components.Endpoints (3)
Forms\ClientValidationCache.cs (1)
145foreach (var rawSegment in renderedName.Substring(start).Split('.'))
src\aspnetcore\src\Shared\Components\ComponentMarker.cs (2)
100return $"Server Component: {TypeName}, Sequence: {Sequence}, Key: {Key?.FormattedComponentKey} Descriptor: {Descriptor?.Substring(5)}..."; 104return $"Auto Component: {TypeName}, Assembly: {Assembly}, Key: {Key?.FormattedComponentKey}, Descriptor: {Descriptor?.Substring(5)}...";
Microsoft.AspNetCore.Components.Server (2)
src\aspnetcore\src\Shared\Components\ComponentMarker.cs (2)
100return $"Server Component: {TypeName}, Sequence: {Sequence}, Key: {Key?.FormattedComponentKey} Descriptor: {Descriptor?.Substring(5)}..."; 104return $"Auto Component: {TypeName}, Assembly: {Assembly}, Key: {Key?.FormattedComponentKey}, Descriptor: {Descriptor?.Substring(5)}...";
Microsoft.AspNetCore.Components.WebAssembly (2)
src\aspnetcore\src\Shared\Components\ComponentMarker.cs (2)
100return $"Server Component: {TypeName}, Sequence: {Sequence}, Key: {Key?.FormattedComponentKey} Descriptor: {Descriptor?.Substring(5)}..."; 104return $"Auto Component: {TypeName}, Assembly: {Assembly}, Key: {Key?.FormattedComponentKey}, Descriptor: {Descriptor?.Substring(5)}...";
Microsoft.AspNetCore.Components.WebView (1)
FileExtensionContentTypeProvider.cs (1)
467return path.Substring(index);
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
93 var requestPath = new Uri(requestAbsoluteUri).AbsolutePath.Substring(1);
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
93 var requestPath = new Uri(requestAbsoluteUri).AbsolutePath.Substring(1);
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
93 var requestPath = new Uri(requestAbsoluteUri).AbsolutePath.Substring(1);
Microsoft.AspNetCore.Diagnostics (1)
StatusCodePage\StatusCodePagesExtensions.cs (1)
106locationFormat = locationFormat.Substring(1);
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (1)
RedactionBenchmark.cs (1)
50routeSegments.Add(new RouteSegment(httpRoute.Substring(startIndex), false));
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\Json\EnumNameHelpers.cs (1)
139return valueIndex == value.Length ? value : value.Substring(valueIndex);
Microsoft.AspNetCore.Http (3)
BindingAddress.cs (3)
109return host.Substring(unixPipeHostPrefixLength); 112private static string GetNamedPipeName(string host) => host.Substring(NamedPipeHostPrefix.Length); 258pathBase = address.Substring(pathDelimiterEnd);
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\Utils.cs (1)
65newQueryString = newQueryString.Substring(1);
Microsoft.AspNetCore.Http.Extensions (1)
UriHelper.cs (1)
133fragment = FragmentString.FromUriComponent(uri.Substring(searchIndex));
Microsoft.AspNetCore.Http.Results (2)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
22var segment = new PathString(contentPath.Substring(1));
VirtualFileHttpResult.cs (1)
157normalizedPath = normalizedPath.Substring(1);
Microsoft.AspNetCore.InternalTesting (4)
AssemblyTestLog.cs (1)
114className = className.Substring(assemblyName.Length + 1);
HttpClientSlim.cs (1)
104var body = response.Substring(response.IndexOf("\r\n\r\n", StringComparison.Ordinal) + 4);
TestFileOutputContext.cs (1)
111name = name.Substring(assemblyName.Length + 1);
xunit\SkipOnAlpineAttribute.cs (1)
32line.StartsWith("ID=", StringComparison.Ordinal) && line.Substring(3).Trim('"', '\'') == "alpine");
Microsoft.AspNetCore.Mvc.Core (5)
Formatters\FormatterMappings.cs (1)
104format = format.Substring(1);
Infrastructure\VirtualFileResultExecutor.cs (1)
116normalizedPath = normalizedPath.Substring(1);
ModelBinding\PrefixContainer.cs (1)
149key = entry.Substring(keyPosition);
Routing\UrlHelperBase.cs (1)
305var segment = new PathString(contentPath.Substring(1));
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
22var segment = new PathString(contentPath.Substring(1));
Microsoft.AspNetCore.Mvc.Razor (3)
Compilation\DefaultRazorPageFactoryProvider.cs (1)
35relativePath = relativePath.Substring(1);
Infrastructure\DefaultFileVersionProvider.cs (1)
67var requestPathBaseRelativePath = resolvedPath.Substring(requestPathBase.Value.Length);
TagHelpers\UrlResolutionTagHelper.cs (1)
255var postTildeSlashUrlValue = trimmedUrl.Substring(2);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
FileProviderRazorProjectItem.cs (1)
85_relativePhysicalPath = PhysicalPath.Substring(_root.Length + 1); // Include leading separator
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
DefaultHtmlGenerator.cs (1)
383resolvedLabelText = expression.Substring(index + 1);
HtmlHelper.cs (1)
787resolvedDisplayName = expression.Substring(index + 1);
ViewComponents\ViewComponentConventions.cs (1)
33return attribute.Name.Substring(separatorIndex + 1);
ViewDataEvaluator.cs (1)
115var rightExpression = expression.Substring(leftExpression.Length + 1);
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Helpers\StringExtensions.cs (1)
75builder.AppendLine(line.Substring(minLeadingWhitespace));
Microsoft.AspNetCore.Owin (1)
Utilities.cs (1)
18return queryString.Substring(1);
Microsoft.AspNetCore.Rewrite (15)
ApacheModRewrite\ConditionPatternParser.cs (1)
123results.Operand = condition.Substring(context.GetIndex());
ApacheModRewrite\CookieActionFactory.cs (1)
46SetActionOption(flagValue.Substring(start).Trim(new[] { ' ', separator }), currentField, ref action);
ApacheModRewrite\RuleRegexParser.cs (1)
16return new ParsedModRewriteInput { Invert = true, Operand = regex.Substring(1) };
IISUrlRewrite\IISUrlRewriteRule.cs (1)
50initMatchResults = InitialMatch.Evaluate(path.ToString().Substring(1), context);
PatternSegments\QueryStringSegment.cs (1)
14return queryString.Substring(1);
RedirectRule.cs (4)
40initMatchResults = InitialMatch.Match(path.ToString().Substring(1)); 71host = new HostString(newPath.Substring(schemeSplit)); 77newPath = newPath.Substring(pathSplit); 91resolvedQuery = request.QueryString.Add(QueryString.FromUriComponent(newPath.Substring(querySplit)));
RedirectToNonWwwRule.cs (1)
54new HostString(request.Host.Value.Substring(4)), // We verified the hostname begins with "www." already.
RewriteRule.cs (2)
37initMatchResults = InitialMatch.Match(path.ToString().Substring(1)); 84result.Substring(split)));
UrlActions\RedirectAction.cs (1)
62pattern.Substring(split)));
UrlActions\RewriteAction.cs (2)
115pattern.Substring(split))); 120pattern.Substring(split));
Microsoft.AspNetCore.Routing (8)
Matching\DfaMatcher.cs (1)
271path.Substring(segment.Start));
Matching\HostMatcherPolicy.cs (1)
422_wildcardEndsWith = HasHostWildcard ? Host.Substring(WildcardHost.Length) : null;
Patterns\RoutePatternMatcher.cs (1)
252var captured = requestSegment.Buffer.Substring(requestSegment.Offset);
Patterns\RoutePatternParser.cs (4)
461return routePattern.Substring(2); 465return routePattern.Substring(1); 558_template.Substring(_index); 562return string.Concat(_template.Substring(0, _index), "|", _template.Substring(_index));
RouteCollection.cs (1)
163queryString = url.Substring(indexOfSeparator);
Microsoft.AspNetCore.Server.HttpSys (1)
UrlPrefix.cs (1)
147path = whole.Substring(pathDelimiterStart);
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http2\Http2Stream.cs (1)
341QueryString = queryIndex == -1 ? string.Empty : path.Substring(queryIndex);
Internal\Http3\Http3Stream.cs (1)
1168QueryString = queryIndex == -1 ? string.Empty : path.Substring(queryIndex);
Internal\SniOptionsSelector.cs (1)
107_wildcardPrefixOptions.Add(name.Substring(1), sniOptions);
Microsoft.AspNetCore.StaticFiles (1)
FileExtensionContentTypeProvider.cs (1)
461return path.Substring(index);
Microsoft.Build (19)
BuildCheck\Checks\EmbeddedResourceCheck.cs (1)
111extension = extension.Substring(1);
BuildCheck\Checks\UntrustedLocationCheck.cs (1)
54context.Data.ProjectFilePath.Substring(context.Data.ProjectFileDirectory.Length + 1)));
BuildCheck\Infrastructure\ConfigurationProvider.cs (1)
173newKey = kv.Key.Substring(keyFilter.Length);
Construction\ProjectElementContainer.cs (1)
604return leadingWhiteSpace.Substring(lastIndexOfNewLine + 1);
Construction\Solution\SolutionFile.cs (1)
955ValidateSolutionFileVersion(str.Substring(slnFileHeaderNoVersion.Length));
Evaluation\Conditionals\Scanner.cs (1)
474expression = expression.Substring(period + 1);
Evaluation\ConditionEvaluator.cs (1)
78rightValueExpanded = rightValueExpanded.Substring(indexOfVerticalBar + 1);
Evaluation\Expander.Function.cs (1)
881functionBuilder.Remainder = expressionFunction.Substring(methodStartIndex);
Evaluation\Expander.PropertyExpander.cs (3)
323propertyBody = propertyBody.Substring(indexerStart); 572string registryLocation = registryExpression.Substring(9); 582? null : registryLocation.Substring(lastAtSignOffset + 1);
Evaluation\Expander\WellKnownFunctions.cs (1)
283returnVal = text.Substring(startIndex);
Evaluation\IntrinsicFunctions.cs (1)
814subKeyName = keyName.Substring(i + 1);
Graph\ProjectGraph.cs (1)
703string projectTargetName = targetName.Substring(baseProjectName.Length + 1);
Logging\BinaryLogger\BinaryLogger.cs (2)
276parameter = parameter.Substring(LogFileParameterPrefix.Length); 785parameter = parameter.Substring(LogFileParameterPrefix.Length);
Logging\TerminalLogger\TerminalLogger.cs (1)
1625? $"{path.Substring(0, index + 1)}{AnsiCodes.MakeBold(path.Substring(index + 1))}"
Logging\TerminalLogger\TerminalNodesFrame.cs (1)
77project = project.Substring(lastDotInProject + 1);
src\msbuild\src\Shared\CanonicalError.cs (1)
301messageOverflow = message.Substring(400);
Microsoft.Build.Framework (22)
BackEnd\Handshake.cs (1)
207variant = flippedDrive + path.Substring(1);
FileUtilities.cs (1)
499path.Substring(start) :
InterningWriteTranslator.cs (1)
147string fileName = str.Substring(splitId + 1);
ItemSpecModifiers.cs (2)
566return directory.Substring(length + 1); 579return directory.Substring(1);
PathHelpers\AbsolutePath.cs (1)
156return Path.Combine(basePath, combined.Substring(2));
Sdk\SdkReference.cs (1)
108? new SdkReference(parts[0], null, parts[1].Substring(4))
Telemetry\CrashTelemetry.cs (4)
846message = message.Substring(internalErrorPrefix.Length); 955: stackTrace.Substring(secondStart); 990string lineSuffix = frame.Substring(lineIndex); 1017string lineSuffix = line.Substring(lineIndex);
Utilities\FileMatcher.cs (8)
754filenamePart = filespec.Substring(indexOfLastDirectorySeparator + 1); 776filenamePart = filespec.Substring(indexOfLastDirectorySeparator + 1); 785filenamePart = filespec.Substring(indexOfLastDirectorySeparator + 1); 799yield return path.Substring(2); 840yield return path.Substring(projectDirectory.Length + 1); 844yield return path.Substring(projectDirectory.Length); 1284recursionState.RemainingWildcardDirectory = indexOfNextSlash != -1 ? recursionState.RemainingWildcardDirectory.Substring(indexOfNextSlash + 1) : string.Empty; 3716return lexicalEnumerationRoot.Substring(relativeStart);
Utilities\FrameworkLocationHelper.cs (1)
833prefix = prefix.Substring(1);
Utilities\MessageParser.cs (1)
204? _text.Substring(_position)
Utilities\VersionUtilities.cs (1)
71version = version.Substring(1);
Microsoft.Build.Tasks.CodeAnalysis (8)
src\roslyn\src\Compilers\Core\MSBuildTask\CanonicalError.cs (1)
266messageOverflow = message.Substring(400);
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
657libDirectory = var.Substring(4);
src\roslyn\src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (1)
192nestedRoot = fullOriginalPath.Substring(containingRoot.Length);
src\roslyn\src\Compilers\Core\MSBuildTask\Vbc.cs (2)
361return originalBaseAddress.Substring(2); 731string? newLine = originalVBErrorString.Substring(0, endParenthesisLocation) + "," + column + originalVBErrorString.Substring(endParenthesisLocation);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Shared\NativeMethods.cs (2)
148return @"\\" + s.Substring(8); 150return s.Substring(4);
Microsoft.Build.Tasks.Core (16)
AssemblyDependency\ReferenceTable.cs (1)
854value = fusionName.Substring(position);
AssignLinkMetadata.cs (1)
56string link = fullPath.Substring(definingProjectDirectory.Length);
AssignTargetPath.cs (2)
137targetPath = itemSpecFullFileNamePath.Value.Substring(fullRootPath.Value.Length); 155targetPath = itemSpecFullFileNamePath.Substring(fullRootPathString.Length);
BootstrapperUtil\BootstrapperBuilder.cs (2)
465string relPath = folder.Substring(packagePath.Length); 613ExploreDirectory(strSubDirectory.Substring(nStartIndex), rootElement, packagePath);
Culture.cs (1)
65cultureName = cultureName.Substring(1);
ManifestUtil\Util.cs (1)
381return IsValidVersion(value.Substring(1), 2);
ManifestUtil\XmlUtil.cs (1)
70return s.Substring(i + 1);
ResourceHandling\MSBuildResXReader.cs (3)
92if (aliases.TryGetValue(aliasedTypeName.Substring(indexStart + 2), out string fullAssemblyIdentity)) 354remainingString = stringValue.Substring(lastIndexOfQuote + 2); 370remainingString = stringValue.Substring(nextSemiColumn + 1);
src\msbuild\src\Shared\CanonicalError.cs (1)
301messageOverflow = message.Substring(400);
src\msbuild\src\Shared\LanguageParser\CSharptokenEnumerator.cs (2)
122current.InnerText = _reader.GetCurrentMatchedString(startPosition).Substring(1); 206identifier = identifier.Substring(1);
TarDirectory.cs (1)
345string relativePath = info.FullName.Substring(basePath.Length);
Microsoft.Build.Utilities.Core (1)
src\msbuild\src\Shared\CanonicalError.cs (1)
301messageOverflow = message.Substring(400);
Microsoft.CodeAnalysis (32)
CommandLine\AnalyzerConfigSet.cs (1)
225string relativePath = normalizedPath.Substring(dirLength);
CommandLine\CommandLineParser.cs (4)
253SarifVersionFacts.TryParse(part.Substring(versionParameterDesignatorLength), out sarifVersion) 559string path = RemoveQuotesAndSlashes(arg.Substring(1)).TrimEnd(null); 791arg = arg.Substring(1); 805optionValue = arg.Substring(optionName.Length + 1).Trim('"');
CommandLine\CommonCompiler.cs (1)
1753return diagnosticId.StartsWith(expectedPrefix, StringComparison.Ordinal) && uint.TryParse(diagnosticId.Substring(expectedPrefix.Length), out code);
Compilation\SubsystemVersion.cs (1)
100minor = str.Substring(index + 1);
DocumentationCommentId.cs (1)
1599name = id.Substring(index);
FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
FileSystem\PathUtilities.cs (4)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 750var replacement = replacementPrefix + filePath.Substring(oldPrefix.Length); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
MetadataReader\MetadataHelpers.cs (1)
963return fullName.Substring(parentNamespaceNameLength);
MetadataReader\MetadataReaderExtensions.cs (1)
27var parts = version.Substring(prefix.Length).Split('.');
MetadataReader\ModuleExtensions.cs (1)
183if (int.TryParse(emittedMethodName.Substring(index + 1), NumberStyles.None, CultureInfo.InvariantCulture, out countOfSlots)
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (11)
509if (int.TryParse(importString.Substring(1), NumberStyles.None, CultureInfo.InvariantCulture, out var tempMethodToken)) 594target = import.Substring(1); 613target = import.Substring(1); 627target = target.Substring(1); 633target = target.Substring(1); 652alias = import.Substring(1); // For consistency with the portable format, store it in alias, rather than externAlias. 718target = import.Substring(pos); 797target = import.Substring(pos); 804target = import.Substring(pos); 810target = import.Substring(pos); 836: input.Substring(separatorPos + 1);
Microsoft.CodeAnalysis.Analyzers (10)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (4)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 750var replacement = replacementPrefix + filePath.Substring(oldPrefix.Length); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
Microsoft.CodeAnalysis.AnalyzerUtilities (10)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (4)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 750var replacement = replacementPrefix + filePath.Substring(oldPrefix.Length); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
Microsoft.CodeAnalysis.CodeStyle (10)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (4)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 750var replacement = replacementPrefix + filePath.Substring(oldPrefix.Length); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
Microsoft.CodeAnalysis.CSharp (11)
CommandLine\CommandLineDiagnosticFormatter.cs (1)
73return normalizedPath.Substring(
Compiler\DocumentationCommentCompiler.cs (2)
1122WriteLine(trimmed.Substring( 1132string trimmed = lines[i].Substring(skipLength);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (2)
149if (int.TryParse(name.Substring(GeneratedNames.AnonymousTypeNameWithoutModulePrefix.Length), NumberStyles.None, CultureInfo.InvariantCulture, out int index)) 170if (int.TryParse(name.Substring(GeneratedNames.AnonymousDelegateNameWithoutModulePrefix.Length), NumberStyles.None, CultureInfo.InvariantCulture, out int index))
Parser\DirectiveParser.cs (1)
350LanguageVersionFacts.TryParse(errorText.Substring(versionMarker.Length), out var languageVersion))
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
511operatorName = operatorName.Substring(lastDotPosition + 1);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
113return (idx > 0) ? fullName.Substring(idx + 1) : fullName; //don't consider leading dots
Symbols\Synthesized\GeneratedNameParser.cs (2)
154if (int.TryParse(fieldName.Substring(lastUnder + 1), NumberStyles.None, CultureInfo.InvariantCulture, out slotIndex) && slotIndex >= 1) 230originalTypeName = generatedName.Substring(prefixEndsAt);
Symbols\Tuples\TupleTypeSymbol.cs (1)
473string tail = name.Substring("Item".Length);
Microsoft.CodeAnalysis.Extensions.Package (2)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
Microsoft.CodeAnalysis.Features (11)
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (11)
509if (int.TryParse(importString.Substring(1), NumberStyles.None, CultureInfo.InvariantCulture, out var tempMethodToken)) 594target = import.Substring(1); 613target = import.Substring(1); 627target = target.Substring(1); 633target = target.Substring(1); 652alias = import.Substring(1); // For consistency with the portable format, store it in alias, rather than externAlias. 718target = import.Substring(pos); 797target = import.Substring(pos); 804target = import.Substring(pos); 810target = import.Substring(pos); 836: input.Substring(separatorPos + 1);
Microsoft.CodeAnalysis.Razor.Compiler (17)
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (1)
1136? fullAttributeName.Substring(1)
Language\DefaultTagHelperResolutionPhase.cs (2)
249resolvedTagName = resolvedTagName.Substring(prefix.Length); 583childTagName = childTagName.Substring(prefix.Length);
Language\Extensions\PreallocatedAttributeTargetExtension.cs (1)
162var dictionaryKey = node.AttributeName.Substring(node.BoundAttribute.IndexerNamePrefix.Length);
Language\Legacy\HtmlMarkupParser.cs (1)
2350tagName = tagName.Substring(1);
Language\Legacy\ImplicitExpressionEditHandler.cs (1)
440return string.IsNullOrWhiteSpace(target.GetContent().Substring(offset));
Language\Legacy\LanguageCharacteristics.cs (1)
95right = CreateToken(token.Content.Substring(splitAt), token.Kind, token.GetDiagnostics());
Language\Legacy\TagHelperBlockRewriter.cs (2)
362attributeName = attributeName.Substring(1); 423attributeName = attributeName.Substring(1);
Language\RazorCodeDocumentExtensions.cs (1)
152var ns = content.Substring("using ".Length).TrimEnd(';').Trim();
Language\RazorProjectItem.cs (2)
86return FileName.Substring(index); 99return FilePath.Substring(index + 1);
Mvc.Version1_X\ViewComponentTagHelperDescriptorFactory.cs (1)
254return name.Substring(separatorIndex + 1);
Mvc.Version2_X\NamespaceDirective.cs (1)
115var segments = source.Substring(directiveSource.Length).Split(Separators);
Mvc.Version2_X\ViewComponentTagHelperDescriptorFactory.cs (1)
269return name.Substring(separatorIndex + 1);
Mvc\ViewComponentTagHelperDescriptorFactory.cs (1)
272return name.Substring(separatorIndex + 1);
SourceGenerators\RazorSourceGenerator.Helpers.cs (1)
213shortNames.Add(lastDot >= 0 ? name.Substring(lastDot + 1) : name);
Microsoft.CodeAnalysis.ResxSourceGenerator (11)
AbstractResxGenerator.cs (1)
843className = fullName.Substring(lastDot + 1);
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (4)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 750var replacement = replacementPrefix + filePath.Substring(oldPrefix.Length); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
Microsoft.CodeAnalysis.VisualBasic (8)
CommandLine\VisualBasicCommandLineParser.vb (1)
2228parseValue = value.Substring(2) ' UInt64.TryParse does not accept hex format strings
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
175Integer.TryParse(name.Substring(prefix.Length), NumberStyles.None, CultureInfo.InvariantCulture, index) Then
SymbolDisplay\SymbolDisplayVisitor.vb (1)
218myCaseCorrectedNSName = emittedName.Substring(nsIdx + 1)
Symbols\SynthesizedSymbols\GeneratedNameParser.vb (4)
61methodName = stateMachineTypeName.Substring(separatorPos + 1) 81variableName = proxyName.Substring(prefixLen) 104Return Integer.TryParse(proxyName.Substring(separator + 1), NumberStyles.None, CultureInfo.InvariantCulture, index) 134Integer.TryParse(fieldName.Substring(prefix.Length), NumberStyles.None, CultureInfo.InvariantCulture, slotIndex) Then
Symbols\Tuples\TupleTypeSymbol.vb (1)
627Dim s As String = name.Substring(4)
Microsoft.CodeAnalysis.VisualBasic.Features (4)
ExtractInterface\VisualBasicExtractInterfaceService.vb (1)
67Return fullDisplayName.Substring(rootNamespace.Length + 1)
LanguageServices\VisualBasicSymbolDisplayService.SymbolDescriptionBuilder.vb (1)
176Return trivia.ToFullString().Substring(1)
Structure\Providers\XmlExpressionStructureProvider.vb (1)
27Dim lineText = line.ToString().Substring(span.Start - line.Start)
Structure\VisualBasicStructureHelpers.vb (1)
23Return "' " & comment.ToString().Substring(1).Trim() & SpaceEllipsis
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (1)
308Dim expectedText = remKeywordText & trivia.ToString().Substring(3)
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (1)
72triviaText = s_CH_STRGHT_Q + triviaText.Substring(1)
CodeCleanup\Providers\ReduceTokensCodeCleanupProvider.vb (1)
189Dim exponent = Integer.Parse(valueText.Substring(exponentIndex + 1), CultureInfo.InvariantCulture)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
987If replacementText.Length > AttributeSuffixLength AndAlso CaseInsensitiveComparison.Equals(halfWidthReplacementText.Substring(halfWidthReplacementText.Length - AttributeSuffixLength), AttributeSuffix) Then
Microsoft.CodeAnalysis.Workspaces (11)
Log\WorkspaceStructureLogger.cs (1)
236s = s.Substring(0, index) + newValue + s.Substring(index + oldValue.Length);
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (4)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 750var replacement = replacementPrefix + filePath.Substring(oldPrefix.Length); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
304callOrInvoke.Name.Substring(4), //remove prefix
Microsoft.Data.Analysis (1)
TextFieldParser.cs (1)
865field = line.Substring(index).TrimEnd(_newLineChars);
Microsoft.Data.Analysis.Tests (1)
src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
865field = line.Substring(index).TrimEnd(_newLineChars);
Microsoft.Deployment.DotNet.Releases (3)
ReleaseVersion.cs (3)
707prerelease = input.Substring(prereleaseSeparatorIndex + 1); 724build = input.Substring(buildSeparatorIndex + 1); 740build = input.Substring(buildSeparatorIndex + 1);
Microsoft.Diagnostics.DataContractReader.DataGenerator (2)
Emitter.cs (2)
564fqn = fqn.Substring(GlobalPrefix.Length); 568fqn = fqn.Substring(RootPrefix.Length);
Microsoft.Diagnostics.NETCore.Client (8)
DiagnosticsIpc\IpcEndpointConfig.cs (3)
197address = address.Substring(NamedPipeDefaultIPCRoot.Length); 201address = address.Substring(NamedPipeSchemaDefaultIPCRootPath.Length); 205address = address.Substring("/".Length);
DiagnosticsIpc\IpcServerTransport.cs (1)
107_pipeName = pipeName.StartsWith(PipePrefix) ? pipeName.Substring(PipePrefix.Length) : pipeName;
DiagnosticsIpc\IpcTransport.cs (3)
408string[] parts = line.Substring(7).Split(new[] { '\t' }, StringSplitOptions.RemoveEmptyEntries); 479return envVar.Substring(7); 562address = address.Substring(IpcRootPath.Length);
DiagnosticsIpc\ProcessEnvironment.cs (1)
59env[pair.Substring(0, equalsIdx)] = equalsIdx != pair.Length - 1 ? pair.Substring(equalsIdx + 1) : "";
Microsoft.DotNet.ApiCompat.Task (1)
src\sdk\src\Tasks\Common\Logger.cs (1)
94format = format.Substring(12);
Microsoft.DotNet.Arcade.Sdk (5)
src\CalculateAssemblyAndFileVersions.cs (1)
89r = int.Parse(BuildNumber.Substring(9));
src\DownloadFile.cs (1)
113var filePath = uri.Substring(FileUriProtocol.Length);
src\ExtractNgenMethodList.cs (1)
62if (int.TryParse(flagsInt?.Value.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out int parsedFlagsInt)
src\GenerateResxSource.cs (1)
469className = fullName.Substring(lastDot + 1);
src\GenerateSourcePackageSourceLinkTargetsFile.cs (1)
91var relativePathToSourceRoot = projectDir.Substring(innerMostRootItemSpec.Length);
Microsoft.DotNet.Build.Manifest (2)
MSBuildListSplitter.cs (1)
43var value = item.Substring(splitIdx + 1);
VersionIdentifier.cs (1)
116nextSegment = assetPathSegment.Substring(currentIndex);
Microsoft.DotNet.Build.Tasks.Feed (1)
src\PushToBuildStorage.cs (1)
553return targetPath.Substring(basePath.Length).TrimStart('/', '\\');
Microsoft.DotNet.Build.Tasks.Installers (12)
src\CreateMD5SumsFile.cs (1)
41string relativePath = file.ItemSpec.Substring(RootDirectory.Length).TrimStart(Path.DirectorySeparatorChar).Replace('\\', '/');
src\CreateRpmPackage.cs (2)
169$"the installed path '/{normalizedPath.Substring("./".Length)}'."); 215string.Join(", ", missingGhostFiles.Select(k => "/" + k.Substring("./".Length))) +
src\CreateWixBuildWixpack.cs (8)
471var value = entry.Substring(idx + 1); 702if (_systemVariablesDictionary.TryGetValue(varName.Substring(4), out var varValue)) 704path = path.Substring(0, startIdx) + varValue + path.Substring(endIdx + 1); 716varName = varName.Substring(4); 722path = path.Substring(0, startIdx) + varValue + path.Substring(endIdx + 1); 782output.Append(input.Substring(pos)); 986varName = varName.Substring(4); 991varName = varName.Substring(4);
src\RpmBuilder.cs (1)
419dirName = dirName.Substring(1);
Microsoft.DotNet.Build.Tasks.Packaging (4)
GeneratePackageReport.cs (1)
155var refAssm = compileAssets.FirstOrDefault(r => !NuGetAssetResolver.IsPlaceholder(r))?.Substring(PackageId.Length + 1);
HarvestPackage.cs (3)
239var refAssm = compileAssets.FirstOrDefault(r => !NuGetAssetResolver.IsPlaceholder(r))?.Substring(PackageId.Length + 1); 305string harvestPackagePath = packageFile.Substring(pathToPackage.Length + 1).Replace('\\', '/'); 616.Select(f => f.Substring(packageFolder.Length + 1).Replace('\\', '/'))
Microsoft.DotNet.Build.Tasks.Templating (1)
MSBuildListSplitter.cs (1)
36string value = item.Substring(splitIdx + 1);
Microsoft.DotNet.Build.Tasks.VisualStudio (4)
OptProf\GenerateTrainingPropsFile.cs (1)
50var dropName = hasDropName ? ProductDropName.Substring(ProductDropNamePrefix.Length) : "dummy";
OptProf\GetRunSettingsSessionConfiguration.cs (2)
87return $"Tests/{dropUrl.Substring(prefix.Length)}"; 106return "ProfilingInputs/" + vsDropName.Substring(prefix.Length);
OptProf\IbcEntry.cs (1)
71=> path.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) ? replacement + path.Substring(prefix.Length) : path;
Microsoft.DotNet.Build.Tasks.Workloads (1)
WorkloadPackageBase.cs (1)
313packageId.Substring(packageId.IndexOf(separator) + separator.Length) :
Microsoft.DotNet.Cli.Definitions (5)
Help\HelpBuilder.cs (1)
307yield return part.Substring(i);
Help\HelpBuilder.Default.cs (3)
259return ("/", rawAlias.Substring(1)); 265return ("--", rawAlias.Substring(2)); 268return ("-", rawAlias.Substring(1));
src\sdk\src\Common\WorkloadSetVersion.cs (1)
72? workloadSetVersion.Substring(sections[0].Length)
Microsoft.DotNet.Cli.Telemetry (1)
Implementation\AzureMonitorConnectionString.cs (1)
47var value = part.Substring(separatorIndex + 1).Trim();
Microsoft.DotNet.Cli.Utils (6)
AnsiConsole.cs (1)
83var text = message.Substring(escapeScan);
EnvironmentProvider.cs (1)
63return Path.Combine(_userHomeDirectory.Value, path.Substring(tildeSlash.Length));
Extensions\StringExtensions.cs (1)
19return prefixLength > 0 ? name.Substring(prefixLength) : name;
PathUtility.cs (1)
247return path.Substring(Path.GetDirectoryName(path)?.Length ?? 0).Trim(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
RuntimeEnvironment.cs (2)
136result.Id = line.Substring(3).Trim('"', '\''); 140result.VersionId = line.Substring(11).Trim('"', '\'');
Microsoft.DotNet.GenFacades (2)
NotSupportedAssemblyGenerator.cs (1)
110_exclusionApis = exclusionApis?.Select(t => t.Substring(t.IndexOf(':') + 1));
SourceGenerator.cs (1)
126sb.Append(',', int.Parse(typeName.Substring(splitIndex + 1)) - 1);
Microsoft.DotNet.HotReload.Watch (3)
FileWatcher\EventBasedDirectoryWatcher.cs (1)
68var oldLocation = Path.Combine(e.OldFullPath, newLocation.Substring(e.FullPath.Length + 1));
HotReload\HotReloadDotNetWatcher.cs (1)
1340relativePath = path.Substring(workingDirectory.Length);
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\StaticWebAsset.cs (1)
68? assetFilePath.Substring(webRootDir.Length - webRoot.Length).Replace("\\", "/")
Microsoft.DotNet.MacOsPkg.Core (1)
Package.cs (1)
63string packageName = Path.Combine(dstPath, package.Value.Substring(1));
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\NuGetUtils.cs (1)
16fileName = partName.Substring(lastSeparator + 1);
Microsoft.DotNet.SdkResolver (1)
VSSettings.cs (1)
139string value = line.Substring(indexOfEquals + 1).Trim();
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WritePackageUsageData.cs (1)
268return path.Substring(RootDir.Length).Replace(Path.DirectorySeparatorChar, '/');
Microsoft.DotNet.TemplateLocator (10)
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
112return !string.IsNullOrEmpty(targetFrameworkVersion) && Version.TryParse(targetFrameworkVersion.Substring(1), out var version) ? version : null;
src\sdk\src\Common\WorkloadSetVersion.cs (1)
72? workloadSetVersion.Substring(sections[0].Length)
src\sdk\src\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs (5)
20return next == -1 ? ids.Substring(idStart) : ids.Substring(idStart, next - idStart); 186if (!ValidIdentifier(ids.Substring(idStart), buildMeta)) 257if (!int.TryParse(fxVersionString.Substring(patchStart), out patch)) 284string pre = (preSeparator == -1) ? fxVersionString.Substring(preStart) : fxVersionString.Substring(preStart, preSeparator - preStart); 294build = fxVersionString.Substring(preSeparator);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (2)
253var modifiedFirst = new ReleaseVersion(1, 1, 1, firstDash == first.Length ? null : first.Substring(firstDash)); 254var modifiedSecond = new ReleaseVersion(1, 1, 1, secondDash == second.Length ? null : second.Substring(secondDash));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (1)
55var cultureName = Path.GetFileNameWithoutExtension(filePath).Substring("WorkloadManifest.".Length);
Microsoft.DotNet.XliffTasks (3)
Model\UnstructuredDocument.cs (2)
51string source = translatableSpan.Substring(separatorIndex + TranslatableSpanSeparator.Length); 65_fragments.Add(text.Substring(lastSpanEnd));
Model\XamlRuleDocument.cs (1)
202return line.Substring(attributeName.Length).Trim(s_attrValueTrimChars);
Microsoft.Extensions.AI.Abstractions (1)
Functions\AIFunctionFactory.cs (1)
876string.Concat(name.Substring(0, asyncIndex), name.Substring(asyncIndex + AsyncSuffix.Length));
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Formats\Html\HtmlReportWriter.cs (1)
95HtmlTemplateAfter = all.Substring(start + SearchString.Length);
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Storage\AzureStorageResultStore.cs (1)
182=> name.Substring(name.LastIndexOf('/') + 1);
Microsoft.Extensions.AI.Integration.Tests (2)
PromptBasedFunctionCallingChatClient.cs (1)
91content = content.Substring(startPos);
VerbatimMultiPartHttpHandler.cs (1)
108string rawValue = part.Substring(headerEnd + 4).TrimEnd('\r', '\n');
Microsoft.Extensions.AI.OpenAI (1)
OpenAIRealtimeClientSession.cs (1)
739string base64 = dataUri.Substring(commaIndex + 1);
Microsoft.Extensions.Configuration (2)
ConfigurationProvider.cs (1)
100return indexOf < 0 ? key.Substring(prefixLength) : key.Substring(prefixLength, indexOf - prefixLength);
ConfigurationSectionDebugView.cs (1)
57string path = section.Path.Substring(prefixLength);
Microsoft.Extensions.Configuration.Abstractions (2)
ConfigurationExtensions.cs (1)
65yield return new KeyValuePair<string, string?>(section.Path.Substring(prefixLength), section.Value);
ConfigurationPath.cs (1)
58return lastDelimiterIndex < 0 ? path : path.Substring(lastDelimiterIndex + 1);
Microsoft.Extensions.Configuration.Binder.SourceGeneration (2)
Specs\TypeIndex.cs (2)
132displayString = displayString.Substring(GlobalPrefix.Length); 138displayString = char.ToUpperInvariant(displayString[0]) + displayString.Substring(1);
Microsoft.Extensions.Configuration.CommandLine (3)
CommandLineConfigurationProvider.cs (3)
65currentArg = $"--{currentArg.Substring(1)}"; 93key = currentArg.Substring(keyStartIndex); 124value = currentArg.Substring(separator + 1);
Microsoft.Extensions.Configuration.EnvironmentVariables (2)
EnvironmentVariablesConfigurationProvider.cs (2)
156string normalizedKeyWithoutConnectionStringPrefix = Normalize(fullKey.Substring(connectionStringPrefix.Length)); 170data[normalizedKey.Substring(_normalizedPrefix.Length)] = value;
Microsoft.Extensions.Configuration.Ini (1)
IniStreamConfigurationProvider.cs (1)
68string value = line.Substring(separator + 1).Trim();
Microsoft.Extensions.DependencyModel (2)
DependencyContextJsonReader.cs (2)
178runtime = runtimeTargetName.Substring(separatorIndex + 1); 782string version = Pool(nameWithVersion.Substring(separatorPosition + 1));
Microsoft.Extensions.FileProviders.Embedded (1)
EmbeddedFileProvider.cs (1)
170resourceName.Substring(_baseNamespace.Length),
Microsoft.Extensions.FileProviders.Physical (3)
PhysicalFilesWatcher.cs (3)
205pattern.StartsWith("./", StringComparison.Ordinal) ? pattern.Substring(2) : pattern; 355string oldLocation = Path.Combine(e.OldFullPath, newLocation.Substring(e.FullPath.Length + 1)); 500string relativePath = fullPath.Substring(_root.Length);
Microsoft.Extensions.Identity.Core (1)
DefaultPersonalDataProtector.cs (1)
44return _encryptor.Unprotect(keyId, data.Substring(split + 1));
Microsoft.Extensions.Localization (1)
ResourceManagerStringLocalizerFactory.cs (1)
241return name.Substring(prefix.Length);
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
529t.Key[0] == '@' && t.Key.Substring(1).Equals(p.CodeName, StringComparison.OrdinalIgnoreCase))
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
97result = result.Substring("global::".Length);
Microsoft.Gen.Logging (2)
Emitter.cs (1)
119? classificationAttr.Substring(GlobalNamespacePrefix.Length)
Parser.cs (1)
278(t[0] == '@' && t.Substring(1).Equals(p.ParameterNameWithAtIfNeeded, StringComparison.OrdinalIgnoreCase)))
Microsoft.Gen.MetadataExtractor (1)
Parser.cs (1)
97result = result.Substring("global::".Length);
Microsoft.Gen.Metrics (1)
MetricFactoryEmitter.cs (1)
54return char.ToLowerInvariant(str[0]) + str.Substring(1);
Microsoft.Interop.ComInterfaceGenerator (3)
IncrementalMethodStubGenerationContext.cs (1)
81return accessorName.Substring(GetterPrefix.Length);
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
72string value = optionKeyAndValue[1].Substring(2);
VirtualMethodPointerStubGenerator.cs (1)
375callingConventions.Add(FunctionPointerUnmanagedCallingConvention(Identifier(callConvSymbol.Name.Substring("CallConv".Length))));
Microsoft.Interop.JavaScript.JSImportGenerator (3)
JSMarshalAsAttributeInfoParser.cs (3)
30string name = gt.Substring(gt.IndexOf("JSType") + "JSType.".Length); 37string argName = ta.Substring(ta.IndexOf("JSType") + "JSType.".Length); 46string name = st.Substring(st.IndexOf("JSType") + "JSType.".Length);
Microsoft.Interop.LibraryImportGenerator (1)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
72string value = optionKeyAndValue[1].Substring(2);
Microsoft.Maui (5)
Fonts\FontFile.cs (1)
68 var postScriptName = hashIndex > 0 ? input.Substring(hashIndex + 1)
Handlers\HybridWebView\FileExtensionContentTypeProvider.cs (1)
467 return path.Substring(index);
Handlers\HybridWebView\HybridWebViewHandler.cs (2)
119 var messageContent = rawMessage.Substring(indexOfPipe + 1); 137 var result = messageContent.Substring(indexOfPipeInContent + 1);
Handlers\HybridWebView\HybridWebViewQueryStringHelper.cs (1)
39 .Substring(1)
Microsoft.Maui.Controls (6)
BindingExpression.cs (1)
223 p = p.Substring(1);
Items\ItemsLayoutTypeConverter.cs (1)
47 var argument = strValue.Substring(identifierLength + 1);
ResourceDictionary.cs (1)
450 return resourceUri.AbsolutePath.Substring(1);
Shell\ShellRouteParameters.cs (2)
49 var key = q.Key.Substring(prefix.Length); 104 query = query.Substring(1);
Xaml\TypeConversionExtensions.cs (1)
206 return str.Substring(2);
Microsoft.Maui.Controls.Build.Tasks (10)
CompiledMarkupExtensions\StaticExtension.cs (1)
25 var membername = member.Substring(dotIdx + 1);
ExpandMarkupsVisitor.cs (3)
87 return new ValueNode(expression.Substring(2), null); 94 expression = expression.Substring(len).TrimStart(); 144 remaining = remaining.Substring(1);
NodeILExtensions.cs (1)
278 yield return Instruction.Create(OpCodes.Ldstr, str.Substring(2));
PerformanceProvider.cs (1)
76 path = path.Substring(index + 14);
SetPropertiesVisitor.cs (1)
1809 localname = localname.Substring(dotIdx + 1);
XamlCTask.cs (3)
56 var code = s.Substring(2); 69 var code = s.Substring(2); 82 var code = s.Substring(2);
Microsoft.Maui.Controls.SourceGen (2)
src\Controls\src\Xaml\TypeArgumentsParser.cs (1)
51 remaining = match.Substring(pos + 1);
src\Controls\src\Xaml\XmlTypeXamlExtensions.cs (1)
74 name = name.Substring(lastIndex + 1);
Microsoft.Maui.Controls.Xaml (13)
ApplyPropertiesVisitor.cs (1)
306 localname = localname.Substring(dotIdx + 1);
ExpandMarkupsVisitor.cs (3)
81 return new ValueNode(expression.Substring(2), null); 97 expression = expression.Substring(len).TrimStart(); 142 remaining = remaining.Substring(1);
MarkupExpressionParser.cs (4)
56 return expression.Substring(2); 65 expression = expression.Substring(len).TrimStart(); 169 remaining = remaining.Substring(1); 224 remaining = remaining.Substring(end + 1);
MarkupExtensions\StaticExtension.cs (1)
28 var membername = Member.Substring(dotIdx + 1);
TypeArgumentsParser.cs (1)
51 remaining = match.Substring(pos + 1);
XamlParser.cs (2)
75 name = new XmlName(reader.NamespaceURI, reader.Name.Substring(elementName.Length + 1)); 322 return new ValueNode(valueString.Substring(2), (IXmlNamespaceResolver)reader, ((IXmlLineInfo)reader).LineNumber,
XmlTypeXamlExtensions.cs (1)
74 name = name.Substring(lastIndex + 1);
Microsoft.Maui.Graphics (3)
PathBuilder.cs (2)
141 entry = entry.Substring(1); 146 _commandStack.Push(entry.Substring(1));
Text\AttributedTextExtensions.cs (1)
192 var value = text.Text.Substring(start);
Microsoft.Maui.Graphics.Text.Markdig (1)
Renderer\SimpleCssParser.cs (1)
24 var value = entry.Substring(index + 1).Trim();
Microsoft.Maui.Resizetizer (1)
GetMauiAssetPath.cs (1)
88 path = path.Substring(projectDirectory.Length);
Microsoft.ML.AutoML (1)
Utils\SweepableParamAttributes.cs (1)
102return $"{name.Substring(index2)}.{o.ToString()}";
Microsoft.ML.AutoML.SourceGenerator (6)
Template\EstimatorType.cs (1)
258returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Template\SearchSpace.cs (1)
275returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Template\SweepableEstimator_T_.cs (1)
282returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Template\SweepableEstimator.cs (1)
277returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Template\SweepableEstimatorFactory.cs (1)
253returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Utils.cs (1)
52return char.ToUpper(str[0]) + str.Substring(1);
Microsoft.ML.CodeGenerator (11)
Templates\Azure\Console\AzureModelBuilder.cs (1)
352returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Azure\Model\AzureImageModelOutputClass.cs (1)
293returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Azure\Model\AzureObjectDetectionModelOutputClass.cs (1)
293returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Console\ConsumeModel.cs (1)
304returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Console\ModelBuilder.cs (1)
669returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Console\ModelInputClass.cs (1)
267returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Console\ModelOutputClass.cs (1)
310returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Console\ModelProject.cs (1)
299returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Console\PredictProgram.cs (1)
326returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Templates\Console\PredictProject.cs (1)
304returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
Utils.cs (1)
146return sanitizedInput.First().ToString().ToUpper() + sanitizedInput.Substring(1);
Microsoft.ML.Core (13)
CommandLine\CharCursor.cs (1)
45return _ichCur < _ichLim ? _text.Substring(_ichCur) : "";
CommandLine\CmdParser.cs (9)
450return name.Substring(0, 1).ToLowerInvariant() + name.Substring(1); 459return name.Substring(0, firstNonUpper).ToLowerInvariant() + name.Substring(firstNonUpper); 579hadError |= !LexFileArguments(str.Substring(1), out nested); 585if (!TryGetOptionValue(info, str.Substring(1), out arg, out option, out tag, out value)) 715value = str.Substring(ichLim + 1); 720value = str.Substring(ichLim); 1041rest = text.Substring(curs.IchCur); 1047string path = token.Substring(1); 1169args = CmdLexer.UnquoteValue(str.Substring(ich));
ComponentModel\ComponentCatalog.cs (1)
765kind = kind.Substring("Signature".Length);
Data\Repository.cs (1)
265pathEnt = entityPath.Substring(ichSplit + 1);
EntryPoints\ModuleArgs.cs (1)
382return $"{name.Substring(index2)}.{o.ToString()}";
Microsoft.ML.Data (18)
DataLoadSave\Text\TextLoader.cs (1)
385string rest = str.Substring(ich + 1);
DataLoadSave\Text\TextLoaderCursor.cs (1)
266sb.Append(pre).Append(text.Substring(2).Trim());
Deprecated\Instances\HeaderSchema.cs (1)
261if (name.Length >= 2 && name[0] == 'f' && int.TryParse(name.Substring(1), out index) &&
Model\Pfa\ModelUtils.cs (2)
22return name.Substring(0, 1).ToLowerInvariant() + name.Substring(1); 31return name.Substring(0, firstNonUpper).ToLowerInvariant() + name.Substring(firstNonUpper);
Transforms\ColumnBindingsBase.cs (6)
147var src = str.Substring(ich + 1); 183src = str.Substring(ichMin); 189src = str.Substring(ich + 1); 811source = str.Substring(ich + 1); 850source = str.Substring(ichMin); 861source = str.Substring(ich + 1);
Transforms\GenerateNumberTransform.cs (1)
71var result = uint.TryParse(str.Substring(ich + 1), out tmp);
Transforms\SlotsDroppingTransformer.cs (2)
74return TryParseSlots(str.Substring(ich + 1)); 159string rest = str.Substring(ich + 1);
Utilities\StreamUtils.cs (3)
85var right = currentPattern.Substring(recursiveIndex + 3); 108files[i] = files[i].Substring(2); 139files[i] = files[i].Substring(2);
Utilities\TypeParsingUtils.cs (1)
131str = str.Substring(ich + 1);
Microsoft.ML.GenAI.Core (2)
Extension\ModuleExtension.cs (1)
152var childrenDeviceMap = deviceMap.Where(x => x.Key.StartsWith($"{key}.")).ToDictionary(x => x.Key.Substring($"{key}.".Length), x => x.Value);
Pipeline\CausalLMPipeline.cs (1)
286tokenString = duplicateTokenString.Substring(tokenString.Length);
Microsoft.ML.GenAI.Mistral (1)
MistralCausalLMAgent.cs (1)
145var json = content.Substring("[TOOL_CALLS]".Length).Trim();
Microsoft.ML.InternalCodeAnalyzer (1)
NameFixProvider.cs (1)
178builder.Append(token.Substring(1).ToLowerInvariant());
Microsoft.ML.Sweeper (3)
Parameters.cs (3)
547scaleStr = paramValue.Substring(atIdx + 1); 589numSteps = int.Parse(option.Substring(option.IndexOf(':') + 1)); 594stepSize = Double.Parse(option.Substring(option.IndexOf(':') + 1), CultureInfo.InvariantCulture);
Microsoft.ML.TensorFlow (3)
TensorflowTransform.cs (2)
325if (int.TryParse(operation.Substring(p + 1), out var idx)) 481var relativePath = fullPath.Substring(_savedModelPath.Length + 1);
TensorflowUtils.cs (1)
575if (int.TryParse(operation.Substring(p + 1), out var idx))
Microsoft.ML.TestFramework (3)
BaseTestPredictorsMaml.cs (2)
247args[i] = string.Format("in={0}", args[i].Substring(4)); 249args[i] = string.Format("data={0}", args[i].Substring(5));
SubComponent.cs (1)
181args = CmdLexer.UnquoteValue(str.Substring(ich));
Microsoft.ML.Tokenizers (6)
Model\BPETokenizer.cs (3)
182merges.Push((merge.Substring(0, index), merge.Substring(index + 1))); 383string newToken = $"{mergeValues.a}{mergeValues.b.Substring(prefixLen)}"; 1169merges.Push((line.Substring(0, index), line.Substring(index + 1)));
Model\CodeGenTokenizer.cs (1)
1790mergeRanks.Add(new StringSpanOrdinalKeyPair(line.Substring(0, index), line.Substring(index + 1)), rank++);
Model\EnglishRobertaTokenizer.cs (1)
222mergeRanks.Set((line.Substring(0, index), line.Substring(index + 1)), rank++);
Model\TiktokenTokenizer.cs (1)
222throw new FormatException($"Can't parse {line.Substring(spaceIndex)} to integer");
Microsoft.ML.Tokenizers.Tests (7)
TiktokenTests.cs (1)
60using Stream compressedStream = Assembly.Load($"Microsoft.ML.Tokenizers.Data.Cl100kBase{assemblyName.Substring(assemblyName.IndexOf(','))}").GetManifestResourceStream("cl100k_base.tiktoken.deflate")!;
TokenizerTests.cs (2)
171string suffixString = (processedText2 ?? input).Substring(index2); 200Assert.Equal(0, tokenizer.CountTokens(s.Substring(index1)));
UnigramTests.cs (4)
500IReadOnlyList<int> ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>(); 506ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index).AsSpan(), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>(); 512ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>(); 518ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index).AsSpan(), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
Microsoft.ML.Vision (2)
DnnRetrainTransform.cs (2)
567if (int.TryParse(operation.Substring(p + 1), out var idx)) 714var relativePath = fullPath.Substring(_modelLocation.Length + 1);
Microsoft.NET.Build.Containers (6)
LocalDaemons\ContainerArchive.cs (3)
64await WriteImageLayersAsync(writer, image, sourceReference, d => $"{d.Substring("sha256:".Length)}/layer.tar", cancellationToken, layerTarballPaths) 204string manifestPath = $"{BlobsPath}/{image.ManifestDigest.Substring("sha256:".Length)}"; 254await WriteImageLayersAsync(writer, image, sourceReference, d => $"{BlobsPath}/{d.Substring("sha256:".Length)}", cancellationToken)
LocalDaemons\DockerCli.cs (3)
316await WriteImageLayers(writer, image, sourceReference, d => $"{d.Substring("sha256:".Length)}/layer.tar", cancellationToken, layerTarballPaths) 454string manifestPath = $"{_blobsPath}/{image.ManifestDigest.Substring("sha256:".Length)}"; 496await WriteImageLayers(writer, image, sourceReference, d => $"{_blobsPath}/{d.Substring("sha256:".Length)}", cancellationToken)
Microsoft.NET.Build.Extensions.Tasks (2)
src\sdk\src\Tasks\Common\ConflictResolution\PackageOverride.cs (1)
66string versionString = trimmedOverriddenPackagesAndVersion.Substring(separatorIndex + 1);
src\sdk\src\Tasks\Common\Logger.cs (1)
94format = format.Substring(12);
Microsoft.NET.Build.Tasks (16)
AssetsFileResolver.cs (1)
127destPath = Path.GetDirectoryName(libraryPath.Substring(pkgRoot.Length));
DependencyContextBuilder.cs (1)
436resolvedPath = referenceAssembly.FullPath.Substring(_referenceAssembliesPath.Length);
GetPackageDirectory.cs (1)
93packageDirectory = originalRoot + packageDirectory.Substring(packageRoot.Length);
ResolveReadyToRunCompilers.cs (1)
275string architectureStr = runtimeIdentifier.Substring(separator + 1).ToLowerInvariant();
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
112return !string.IsNullOrEmpty(targetFrameworkVersion) && Version.TryParse(targetFrameworkVersion.Substring(1), out var version) ? version : null;
src\sdk\src\Common\WorkloadSetVersion.cs (1)
72? workloadSetVersion.Substring(sections[0].Length)
src\sdk\src\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs (5)
20return next == -1 ? ids.Substring(idStart) : ids.Substring(idStart, next - idStart); 186if (!ValidIdentifier(ids.Substring(idStart), buildMeta)) 257if (!int.TryParse(fxVersionString.Substring(patchStart), out patch)) 284string pre = (preSeparator == -1) ? fxVersionString.Substring(preStart) : fxVersionString.Substring(preStart, preSeparator - preStart); 294build = fxVersionString.Substring(preSeparator);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (2)
253var modifiedFirst = new ReleaseVersion(1, 1, 1, firstDash == first.Length ? null : first.Substring(firstDash)); 254var modifiedSecond = new ReleaseVersion(1, 1, 1, secondDash == second.Length ? null : second.Substring(secondDash));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (1)
55var cultureName = Path.GetFileNameWithoutExtension(filePath).Substring("WorkloadManifest.".Length);
src\sdk\src\Tasks\Common\ConflictResolution\PackageOverride.cs (1)
66string versionString = trimmedOverriddenPackagesAndVersion.Substring(separatorIndex + 1);
src\sdk\src\Tasks\Common\Logger.cs (1)
94format = format.Substring(12);
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAsset.cs (1)
486var reqValue = requirement.Substring(eqIdx + 1);
Microsoft.NET.Sdk.Publish.Tasks (3)
MsDeploy\CommonUtility.cs (1)
1504provider = subError.Substring(lastIndexOfFwLink + 1);
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
112return !string.IsNullOrEmpty(targetFrameworkVersion) && Version.TryParse(targetFrameworkVersion.Substring(1), out var version) ? version : null;
Tasks\MsDeploy\NormalizeServiceUrl.cs (1)
177url.Append(serviceUrl.Substring(iSpot));
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
Data\StaticWebAsset.cs (1)
486var reqValue = requirement.Substring(eqIdx + 1);
Data\StaticWebAssetEndpoint.cs (2)
628? endpoint.Route.Substring(normalizedOldBase.Length).TrimStart('/') 666? property.Value.Substring(normalizedOldBase.Length).TrimStart('/')
DefineStaticWebAssets.cs (2)
148var result = normalizedAssetPath.Substring(directoryPathLength); 507var result = normalizedAssetPath.Substring(normalizedContentRoot.Length);
GenerateStaticWebAssetEndpointsManifest.cs (1)
189return $"{header.Substring(0, index)}{encoded}{header.Substring(endIndex)}";
Microsoft.NET.Sdk.WorkloadManifestReader (10)
SdkDirectoryWorkloadManifestProvider.cs (2)
253var modifiedFirst = new ReleaseVersion(1, 1, 1, firstDash == first.Length ? null : first.Substring(firstDash)); 254var modifiedSecond = new ReleaseVersion(1, 1, 1, secondDash == second.Length ? null : second.Substring(secondDash));
src\sdk\src\Common\EnvironmentVariableNames.cs (1)
112return !string.IsNullOrEmpty(targetFrameworkVersion) && Version.TryParse(targetFrameworkVersion.Substring(1), out var version) ? version : null;
src\sdk\src\Common\WorkloadSetVersion.cs (1)
72? workloadSetVersion.Substring(sections[0].Length)
src\sdk\src\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs (5)
20return next == -1 ? ids.Substring(idStart) : ids.Substring(idStart, next - idStart); 186if (!ValidIdentifier(ids.Substring(idStart), buildMeta)) 257if (!int.TryParse(fxVersionString.Substring(patchStart), out patch)) 284string pre = (preSeparator == -1) ? fxVersionString.Substring(preStart) : fxVersionString.Substring(preStart, preSeparator - preStart); 294build = fxVersionString.Substring(preSeparator);
WorkloadManifestReader.Localization.cs (1)
55var cultureName = Path.GetFileNameWithoutExtension(filePath).Substring("WorkloadManifest.".Length);
Microsoft.SourceLink.Tools.Package (2)
SourceLinkMap.cs (2)
164uriSuffix = value.Substring(uriStar + 1); 214var escapedPath = string.Join("/", path.Substring(file.Path.Length).Split(new[] { '/', '\\' }).Select(Uri.EscapeDataString));
Microsoft.TemplateEngine.Cli (2)
CliTemplateParameter.cs (1)
452if (long.TryParse(value.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out long convertedHex))
TabularOutput\TabularOutput.cs (1)
436lines.Add(text.Substring(position));
Microsoft.TemplateEngine.Core (3)
Expressions\Cpp\CppStyleEvaluatorDefinition.cs (1)
564&& long.TryParse(literal.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out literalLong))
Expressions\Shared\CoreConverters.cs (2)
18if (ls!.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) && long.TryParse(ls.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out result)) 35if (ls!.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) && int.TryParse(ls.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out result))
Microsoft.TemplateEngine.Edge (9)
Mount\Archive\ZipFileMountPoint.cs (2)
92return new ZipFileFile(this, path, path.Substring(path.LastIndexOf('/') + 1), null); 106return new ZipFileDirectory(this, path, path.Substring(path.LastIndexOf('/') + 1));
Mount\FileSystem\FileSystemDirectory.cs (3)
35string baseName = x.Substring(fileSystemMountPoint.MountPointRootPath.Length).Replace(Path.DirectorySeparatorChar, '/'); 60string baseName = x.Substring(((FileSystemMountPoint)MountPoint).MountPointRootPath.Length).Replace(Path.DirectorySeparatorChar, '/'); 85string baseName = x.Substring(((FileSystemMountPoint)MountPoint).MountPointRootPath.Length).Replace(Path.DirectorySeparatorChar, '/');
Settings\ComponentManager.cs (1)
307string asmName = typeName.Substring(commaIndex + 1).Trim();
Settings\SettingsFilePaths.cs (2)
47string localPath = p.Substring(path.Length).TrimStart('\\', '/'); 156return Path.Combine(_environmentSettings.Paths.UserProfileDir, path.Substring(1));
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (1)
496_ => str.First().ToString().ToLower() + str.Substring(1),
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (8)
BindSymbolEvaluator.cs (1)
153binding = configuredBinding.Substring(configuredBinding.IndexOf(':') + 1).Trim();
OperationConfig\ConditionalBlockCommentConfig.cs (1)
60pseudoEndComment = endToken.Substring(0, endToken.Length - 1) + " " + endToken.Substring(endToken.Length - 1);
ParameterConverter.cs (1)
255&& long.TryParse(literal.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out parsed))
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (1)
496_ => str.First().ToString().ToLower() + str.Substring(1),
ValueForms\FirstLowerCaseInvariantValueFormFactory.cs (1)
17_ => value.First().ToString().ToLowerInvariant() + value.Substring(1),
ValueForms\FirstLowerCaseValueFormFactory.cs (1)
17_ => value.First().ToString().ToLower() + value.Substring(1),
ValueForms\FirstUpperCaseInvariantValueFormFactory.cs (1)
17_ => value.First().ToString().ToUpperInvariant() + value.Substring(1),
ValueForms\FirstUpperCaseValueFormFactory.cs (1)
17_ => value.First().ToString().ToUpper() + value.Substring(1),
Microsoft.TemplateEngine.Utils (18)
InMemoryFileSystem.cs (15)
39string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\'); 69string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\'); 104string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\'); 142string rel = directory.Substring(_root.FullPath.Length).Trim('/', '\\'); 179string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\'); 259string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\'); 341string rel = directoryName.Substring(_root.FullPath.Length).Trim('/', '\\'); 443string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\'); 469string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\'); 499string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\'); 557string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\'); 589string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\'); 620string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\'); 651string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\'); 710path = path.Substring(1);
PhysicalFileSystem.cs (1)
141resultPath = target.Substring(relativeTo.Length + 1);
RangeVersionSpecification.cs (1)
56string startVersion = parts[0].Substring(1);
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (1)
496_ => str.First().ToString().ToLower() + str.Substring(1),
Microsoft.TemplateSearch.Common (1)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (1)
496_ => str.First().ToString().ToLower() + str.Substring(1),
Microsoft.TestPlatform.AdapterUtilities (1)
ManagedNameUtilities\ManagedNameParser.cs (1)
39typeName = managedTypeName.Substring(pos + 1);
Microsoft.TestPlatform.Build (1)
Tasks\VSTestTask2.cs (1)
80singleLine = singleLine.Substring(_ansiReset.Length);
Microsoft.VisualBasic.Core (20)
Microsoft\VisualBasic\CompilerServices\StringType.vb (5)
246Skip = AsteriskSkip(Pattern.Substring(PatternIndex + 1), Source.Substring(SourceIndex), SourceEndIndex - SourceIndex, CompareMethod.Binary, m_InvariantCompareInfo) 429Skip = AsteriskSkip(Pattern.Substring(PatternIndex + 1), Source.Substring(SourceIndex), SourceEndIndex - SourceIndex, CompareMethod.Text, ci) 734NewSource = Source.Substring(SourceEndIndex - Count)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (3)
161Return s.Substring(1) 284tmpValue = ToHalfwidthNumbers(value.Substring(firstNonspace + 2), GetCultureInfo()) 322tmpValue = ToHalfwidthNumbers(value.Substring(firstNonspace + 2), GetCultureInfo())
Microsoft\VisualBasic\ErrObject.vb (1)
193Me.HelpContext = CInt(HelpLink.Substring(iContext + 1))
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (1)
984Field = Line.Substring(Index).TrimEnd(Chr(13), Chr(10))
Microsoft\VisualBasic\Information.vb (3)
210Result = Result.Substring(1) 479Result = Result.Substring(i + 1) 579Result = Result.Substring(1)
Microsoft\VisualBasic\Interaction.vb (1)
73m_CommandLine = LTrim(s.Substring(LengthOfAppName))
Microsoft\VisualBasic\Strings.vb (6)
678Expression = Expression.Substring(Start - 1) 735Builder.Append(Expression.Substring(Start)) 742Builder.Append(Expression.Substring(Start)) 868sSubString = sSrc.Substring(iLastIndex) 898sSubString = sSrc.Substring(iLastIndex) 1903Return [str].Substring(Start - 1)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
XML\XmlPersistence.cs (1)
471attributeName = attributeName.Substring(0, 1).ToLowerInvariant() + attributeName.Substring(1);
Microsoft.Web.XmlTransform (7)
XmlElementContext.cs (1)
269prefix = nsAttribute.Name.Substring(index + 1);
XmlFormatter.cs (4)
280return whitespace.Substring(index); 403return whitespace.Substring(index); 424return currentIndentNode.Value.Substring(previousIndentNode.Value.Length); 441return indent.Substring(index + 1);
XmlTransforms.cs (2)
426strbuilder.Append(transformValue.Substring(position)); 619strbuilder.Append(transformValue.Substring(position));
Microsoft.Win32.Registry (1)
Microsoft\Win32\Registry.cs (1)
59keyName.Substring(i + 1);
Mono.Cecil (3)
Mono.Cecil\TypeParser.cs (2)
85 return ParseInt32 (name.Substring (index + 1), out arity); 317 name = fullname.Substring (last_dot + 1);
Mono.Cecil\WindowsRuntimeProjections.cs (1)
417 type.Name = type.Name.Substring ("<CLR>".Length);
Mono.Cecil.Pdb (4)
Microsoft.Cci.Pdb\PdbFunction.cs (1)
51return module.Substring(li + 1);
Mono.Cecil.Pdb\NativePdbReader.cs (3)
262 var value = used_namespace.Substring (1); 280 var alias_target_value = used_namespace.Substring (index + 2); 299 target = new ImportTarget (ImportTargetKind.ImportNamespace) { @namespace = value.Substring (2) };
MSBuild (7)
CommandLine\CommandLineParser.cs (7)
267switchName = unquotedCommandLineArg.Substring(switchIndicatorsLength); 336string responseFile = FileUtilities.FixFilePath(unquotedCommandLineArg.Substring(1)); 489switchParameters = switchParameters.Substring(1); 608Assumed.Equal(switchName, unquotedSwitchIndicatorAndName.Substring(switchIndicatorsLength), "The switch name extracted from either the partially or completely unquoted arg should be the same."); 617switchParameters = commandLineArg.Substring(quotedSwitchParameterIndicator); 628switchParameters = unquotedCommandLineArg.Substring(switchParameterIndicator); 634switchParameters = $":\"{commandLineArg.Substring(quotedSwitchParameterIndicator + 1)}";
NuGet.Build.Tasks.Pack (1)
PackTaskLogic.cs (1)
1154var value = item.Substring(index + 1);
NuGet.CommandLine.XPlat (3)
Commands\Package\PackageWithNuGetVersion.cs (1)
41string versionString = token.Value.Substring(separatorIndex + 1);
Commands\Package\PackageWithVersionRange.cs (1)
41string versionString = token.Value.Substring(separatorIndex + 1);
Utility\XPlatUtility.cs (1)
151? extension.Substring(extension.Length - 4)
NuGet.Commands (4)
CommandRunners\PackCommandRunner.cs (1)
748path = path.Substring(index + basePath.Length).TrimStart(Path.DirectorySeparatorChar);
RestoreCommand\Utility\BuildAssetsUtils.cs (2)
121path = $"$({macroName})" + $"{path.Substring(macroValue.Length)}"; 373path = $"$(NuGetPackageRoot){absolutePath.Substring(repositoryRoot.Length)}";
RestoreCommand\Utility\MSBuildRestoreUtility.cs (1)
1210return s.Substring(0, prefixWithoutSlashes.Length) + slashes + s.Substring(prefixWithoutSlashes.Length + 1);
NuGet.Common (5)
PathUtil\PathResolver.cs (1)
221searchPath = searchPath.Substring(parentDirectoryPath.Length);
PathUtil\PathUtility.cs (4)
304return path.Substring(fullDirectoryPath.Length).Trim(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); 329path = path.Substring(1); 397folder.Substring(folder.Length - remainingWidth)); 515filename = filename.Substring(currentDirectoryPath.Length);
NuGet.Configuration (2)
Settings\Settings.cs (1)
803return Path.Combine(Path.GetPathRoot(configDirectory)!, value.Substring(1));
Utility\FileSystemUtility.cs (1)
99return fullPath.Substring(root.Length).TrimStart(Path.DirectorySeparatorChar);
NuGet.PackageManagement (5)
Utility\FileSystemUtility.cs (3)
188trimmedPaths.Add(filePath.Substring(root.Length).TrimStart(Path.DirectorySeparatorChar)); 493return fullPath.Substring(root.Length).TrimStart(Path.DirectorySeparatorChar); 498return fullPath.Substring(root.Length).TrimStart(Path.DirectorySeparatorChar);
Utility\MSBuildNuGetProjectSystemUtility.cs (2)
589effectivePathForContentFile = effectivePathForContentFile.Substring((PackagingConstants.Folders.Content + Path.DirectorySeparatorChar).Length); 598effectivePathForContentFile = effectivePathForContentFile.Substring(frameworkFolderEndIndex + 1);
NuGet.Packaging (13)
ContentModel\ContentItemCollection.cs (2)
57Path = "ref/any" + path.Substring("lib/contract".Length) 312relatedFileExtensionList.Add(asset.Path.Substring(assemblyPrefix.Length - 1));
Licenses\LicenseExpressionTokenizer.cs (1)
58processingToken = processingToken.Substring(1);
PackageArchiveReader.cs (1)
303packageFileName = packageFileName.Substring(1);
PackageCreation\Authoring\PackageBuilder.cs (2)
960extensions.Add(fileExtension.Substring(1)); 1050packagePath = fullPath.Substring(searchDirectory.Length).TrimStart(Path.DirectorySeparatorChar);
PackageCreation\Utility\FrameworkNameUtility.cs (4)
23string frameworkPart = filePath.Substring(folderPrefix.Length); 78effectivePath = path.Substring(targetFrameworkString.Length + 1); 93string frameworkPart = filePath.Substring(folderPrefix.Length); 148effectivePath = path.Substring(targetFrameworkString.Length + 1);
PackageExtraction\PackagePathHelper.cs (1)
100NuGetVersion.TryParse(name.Substring(packageId.Length + 1), out parsedVersion) &&
PackageFileExtractor.cs (1)
86file.Substring(fileSeparatorIndex);
Signing\Content\KeyPairFileReader.cs (1)
89var value = line.Substring(pos + 1);
NuGet.ProjectModel (4)
LazyStringSplit.cs (1)
88Current = _input.Substring(_index);
MacroStringsUtility.cs (2)
58return macroName + originalString.Substring(macroValue.Length); 67return macroValue + originalString.Substring(macroName.Length);
StringExtensions.cs (1)
26s.Substring(index + 1));
NuGet.Protocol (5)
LegacyFeed\LegacyFeedCapabilityResourceV2Feed.cs (1)
205packageEntityName = packageEntityName.Substring(lastIndex + 1);
PackagesFolder\NuGetv3LocalRepository.cs (1)
184var versionPart = fullVersionDir.Substring(packageIdRoot.Length).TrimStart(Path.DirectorySeparatorChar);
Providers\RepositorySignatureResourceProvider.cs (1)
164var version = serviceEntry.Type.Substring(index + 1).Trim();
Utility\CachingUtility.cs (1)
27var trailing = value.Length > 32 ? value.Substring(value.Length - 32) : value;
Utility\LocalFolderUtility.cs (1)
600var versionString = idVersionString.Substring(prefix.Length);
NuGet.Versioning (2)
FloatRange.cs (2)
267var releaseVersion = versionString.Substring(dashPosition + 1); 319releasePrefix = actualVersion.Substring(versionString.LastIndexOf('-') + 1);
PresentationBuildTasks (44)
Microsoft\Build\Tasks\Windows\UidManager.cs (3)
857string suffix = uid.Substring(separatorIndex + 1); 879return typeFullName.Substring(index + 1); 1293return Content.Substring(temp);
MS\Internal\MarkupCompiler\MarkupCompiler.cs (6)
1400string subClassName = subClassFullName.Substring(index + 1); 1430className = className.Substring(index + 1); 1603string relPath = TargetPath.Substring(SourceFileInfo.SourcePath.Length); 2492baseClassName = baseClassFullName.Substring(dotIndex + 1); 3013string rootClassName = elementType != null ? elementType.Name : baseClassFullName.Substring(baseClassFullName.LastIndexOf(DOT, StringComparison.Ordinal)+1); 3382get { return _elementType != null ? _elementType.Name : _localElementFullName.Substring(_localElementFullName.LastIndexOf(DOT, StringComparison.Ordinal) + 1); }
MS\Internal\MarkupCompiler\ParserExtension.cs (2)
287localAttribName = localAttribName.Substring(lastIndex + 1); 332localAttribName = localAttribName.Substring(lastIndex + 1);
MS\Internal\Tasks\CompilerLocalReference.cs (1)
126filePath = filePath.Substring(1);
MS\Internal\Tasks\CompilerWrapper.cs (2)
404relPath = fullFilePath.Substring(_sourceDir.Length); 422newRelativeFilePath = fullFilePath.Substring(pathEndIndex + 1);
MS\Internal\Tasks\TaskHelper.cs (1)
104relPath = fullpath2.Substring (fullpath1.Length);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\MS\Internal\Globalization\LocalizationComments.cs (1)
357enumName = enumName.Substring(_enumPrefix.Length);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlMapTable.cs (1)
1164typeShortName = typeFullName.Substring(dotIndex + 1);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (5)
385attrValue = attrValue.Substring(2); 566typename = typename.Substring(typeIndex + 1); 751typename = typename.Substring(typeIndex + 1); 1367string localName = (nameIndex < 0) ? propertyName : propertyName.Substring(nameIndex+1); 1505string localName = (nameIndex < 0) ? name : name.Substring(nameIndex+1);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleXamlParser.cs (3)
309localAttribName = localAttribName.Substring(lastIndex + 1); 391member = propOrEvent.Substring(dotIndex + 1); 400member = target.Substring(colonIndex + 1);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (3)
346localAttribName = localAttribName.Substring(lastIndex + 1); 440member = propertyName.Substring(dotIndex+1); 449member = target.Substring(colonIndex+1);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (7)
1087propertyName = propertyName.Substring(dotIndex+1); 1554_childTag.Substring(_childTag.LastIndexOf('.') + 1); 1658propName = longName.Substring(idx + 1); 2212prefix = attribName.Substring(NamespacePrefix.Length); 3054typeName = attribData.Args.Substring(colonIndex + 1); 3204$"Set{methodInfo.Name.Substring("Get".Length)}", 3516null != methodInfo.DeclaringType.GetMethod($"Set{methodInfo.Name.Substring("Get".Length)}",
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (7)
946localName = localName.Substring(lastIndex+1); 2100return methodInfo.Name.Substring("Get".Length); 2248typeName = typeName.Substring(typeIndex + 1); 2257memberName = typeName.Substring(typeIndex + 1); 2871typeString = typeString.Substring(colonIndex + 1); 2954typeString = typeString.Substring(colonIndex + 1); 3320_assemblyNames[k].Substring(charIndex + 1) == usingAssemblyName)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\ResourceIDHelper.cs (1)
72resourceID = sourcePath.Substring(basePath.Length);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (1)
89$"Get{methodInfo.Name.Substring("Set".Length)}",
PresentationCore (17)
MS\Internal\AppModel\SiteOfOriginPart.cs (1)
126string uriMinusInitialSlash = original.Substring(1); // trim leading '/'
MS\Internal\FontCache\CanonicalFontFamilyReference.cs (1)
175escapedFamilyName = normalizedString.Substring(familyNameIndex);
MS\Internal\FontCache\FontResourceCache.cs (1)
123fileName = resourceFullName.Substring(indexOfLastSlash + 1);
MS\Internal\FontCache\FontSource.cs (1)
391string fontFilename = _fontUri.OriginalString.Substring(_fontUri.OriginalString.LastIndexOf('/') + 1).ToLowerInvariant();
MS\Internal\FontFace\CompositeFontParser.cs (1)
129s = s.Substring(2);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
140extension = extensionWithDot.Substring(1).ToLower(CultureInfo.InvariantCulture);
System\Windows\Input\Command\KeyGesture.cs (2)
255keyGestures = keyGestures.Substring(index + 1); 268displayStrings = displayStrings.Substring(index + 1);
System\Windows\Input\Command\KeyGestureConverter.cs (2)
91displayString = fullName.Substring(index + 1).Trim(); 104keyToken = fullName.Substring(index + 1);
System\Windows\Input\Command\MouseGestureConverter.cs (1)
66mouseActionToken = fullName.Substring(Offset + 1);
System\Windows\Input\InputScopeNameConverter.cs (1)
97stringSource = stringSource.Substring(stringSource.LastIndexOf('.')+1);
System\Windows\Media\Parsers.cs (2)
90string tokens = trimmedColor.Substring(s_ContextColor.Length); 98tokens = tokens.Substring(preSplit[0].Length);
System\Windows\Navigation\BaseUriHelper.cs (3)
242partName = original.Substring(start); 261partName = original.Substring(end + 1); 291assemblyVersion = assemblyInfo[i].Substring(1); // Get rid of the leading "v"
PresentationFramework (66)
Microsoft\Win32\FileDialog.cs (1)
274value = value.Substring(1); // but strip out the period to leave only "ext"
MS\Internal\Data\PathParser.cs (3)
142SetError(nameof(SR.PathSyntax), _path.Substring(0, _index), _path.Substring(_index)); 188SetError(nameof(SR.UnmatchedParen), _path.Substring(start)); 234SetError(nameof(SR.UnmatchedBracket), _path.Substring(start - 1));
MS\Internal\Data\PropertyPathWorker.cs (1)
130return s.Substring(lastBracketIndex);
MS\Internal\Data\RBNode.cs (8)
807s = s.Substring(2); 814s = s.Substring(1); // skip '(' 817s = s.Substring(1); 821s = s.Substring(index + 1); 825s = s.Substring(index+1); 831s = s.Substring(index+1); 835s = s.Substring(index); 842s = s.Substring(1); // skip ')'
MS\Internal\Data\RBTree.cs (2)
652if (s.StartsWith("\"", StringComparison.Ordinal)) s = s.Substring(1); 655s = s.Substring(index);
MS\Internal\Globalization\BamlTreeUpdater.cs (1)
772typeName = fullTypeName.Substring(lastDot + 1);
MS\Internal\Globalization\LocalizationComments.cs (1)
357enumName = enumName.Substring(_enumPrefix.Length);
MS\Internal\IO\Packaging\XamlFilter.cs (1)
875propertyName = name.Substring(suffixStart + 1);
MS\Internal\Utility\BindUriHelper.cs (1)
162fragment = frag.Substring(1);
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (1)
158type = Projections.FindCustomPublicTypeForAbiType(type) ?? type.Assembly.GetType(type.FullName.Substring("ABI.".Length)) ?? type;
MS\Internal\WindowsRuntime\Generated\WinRT\TypeExtensions.cs (1)
78return ns.Substring(NamespacePrefix.Length);
System\Windows\Documents\FixedSchema.cs (1)
423attrValue = attrValue.Substring(_colorConvertedBitmap.Length);
System\Windows\Documents\RtfToXamlReader.cs (2)
8116instructionName = instructionName.Substring(1); 8170imageXaml += dnImage.Xaml.Substring(uriSourceEndIndex + 1);
System\Windows\Documents\TextStore.cs (1)
4826name = name.Substring(24); // 24 == length of "s.w.c."
System\Windows\Documents\WpfPayload.cs (1)
701imageSourceString = imageSourceString.Substring(1); // cut the leading dot out
System\Windows\Documents\XamlToRtfWriter.cs (1)
2236string imageFormatName = imageName.Substring(extensionIndex);
System\Windows\Documents\ZoomPercentageConverter.cs (1)
174zoomString = zoomString.Substring(1);
System\Windows\Input\Command\CommandConverter.cs (1)
233localName = localName.Substring(Offset + 1);
System\Windows\Input\Command\CommandValueSerializer.cs (1)
147commandName = value.Substring(dotIndex + 1).Trim();
System\Windows\Markup\BamlMapTable.cs (1)
1164typeShortName = typeFullName.Substring(dotIndex + 1);
System\Windows\Markup\BamlReader.cs (7)
1309typeName = typeName.Substring(typeName.LastIndexOf('.') + 1); 1433markupString = markupString.Substring(markupString.LastIndexOf('.') + 1); 1557typename = typename.Substring(typename.LastIndexOf('.') + 1); 1962_localName = _name.Substring(_name.LastIndexOf('.') + 1); 2410typeName = typeName.Substring(typeName.LastIndexOf('.') + 1); 2485typeName = typeName.Substring(typeName.LastIndexOf('.') + 1); 2599typeName = typeName.Substring(typeName.LastIndexOf('.') + 1);
System\Windows\Markup\BamlRecordReader.cs (3)
3809value = OptionallyMakeNullable(methodInfo.GetParameters()[1].ParameterType, value, methodInfo.Name.Substring("Set".Length)); 5838return this.AttachedPropertySetter.Name.Substring("Set".Length); 5842return this.AttachedPropertyGetter.Name.Substring("Get".Length);
System\Windows\Markup\BamlWriter.cs (1)
533typeName = data.Args.Substring(colonIndex+1);
System\Windows\Markup\DependencyPropertyConverter.cs (2)
140property = value.Substring(lastIndex + 1); 151property = value.Substring(lastIndex + 1);
System\Windows\Markup\MarkupExtensionParser.cs (5)
385attrValue = attrValue.Substring(2); 566typename = typename.Substring(typeIndex + 1); 751typename = typename.Substring(typeIndex + 1); 1367string localName = (nameIndex < 0) ? propertyName : propertyName.Substring(nameIndex+1); 1505string localName = (nameIndex < 0) ? name : name.Substring(nameIndex+1);
System\Windows\Markup\RoutedEventConverter.cs (2)
68routedEventName = routedEventName.Substring(lastIndex + 1); 158nameString = nameString.Substring(nsIndex + 1);
System\Windows\Markup\RoutedEventValueSerializer.cs (1)
60string name = value.Substring(index + 1).Trim();
System\Windows\Markup\XamlTypeMapper.cs (9)
946localName = localName.Substring(lastIndex+1); 1646localName = localName.Substring(lastIndex+1); 1773localName = localName.Substring(lastIndex+1); 2100return methodInfo.Name.Substring("Get".Length); 2248typeName = typeName.Substring(typeIndex + 1); 2257memberName = typeName.Substring(typeIndex + 1); 2871typeString = typeString.Substring(colonIndex + 1); 3035nameString = nameString.Substring (nsIndex + 1); 3320_assemblyNames[k].Substring(charIndex + 1) == usingAssemblyName)
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (2)
268clrNamespace = xmlNamespace.Substring(clrNsIndex); 277assembly = xmlNamespace.Substring(assemblyIndex);
System\Windows\Navigation\JournalEntry.cs (1)
354displayName = displayName.Substring(1);
System\Windows\PropertyPath.cs (2)
573propertyName = name.Substring(lastIndex + 1).Trim(); 832name = name.Substring(nsIndex + 1).TrimStart();
ReachFramework (5)
AlphaFlattener\PrimitiveList.cs (1)
92typ = typ.Substring(typ.LastIndexOf('.') + 1);
PrintConfig\PrtCap_Reader.cs (1)
553return QName.Substring(colonIndex + 1);
PrintConfig\PrtTicket_Editor.cs (1)
435string localName =QName.Substring(colonIndex + 1);
Serialization\VisualSerializer.cs (1)
1476_writer.WriteAttributeString("Figures", p.Substring(3));
Serialization\XpsImageSerializationService.cs (1)
156foundType = XpsManager.SupportedImageType( new ContentType(imageMimeType.Substring(start)) );
RepoTasks (1)
BatchHelixWorkItems.cs (1)
63tfm = separatorIndex >= 0 ? workItem.ItemSpec.Substring(separatorIndex + 2) : string.Empty;
Roslyn.Diagnostics.Analyzers (10)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (4)
641var relativePath = childPath.Substring(parentPath.Length); 647relativePath = relativePath.Substring(start); 750var replacement = replacementPrefix + filePath.Substring(oldPrefix.Length); 771filePath = char.ToUpper(filePath[0]) + filePath.Substring(1);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
62string value = feature.Substring(equals + 1).Trim('"');
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (2)
91return (index >= 0) ? path.Substring(index) : string.Empty; 193var fileName = (fileNameStart <= 0) ? path : path!.Substring(fileNameStart);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (2)
77return convert(shortName[1]) + shortName.Substring(2); 82return convert(shortName[0]) + shortName.Substring(1);
rzc (6)
Application.cs (1)
104var fileName = arg.Substring(1);
CommandLine\AnsiConsole.cs (1)
66var text = message.Substring(escapeScan);
CommandLine\CommandLineApplication.cs (2)
154longOption = arg.Substring(2).Split(new[] { ':', '=' }, 2); 158shortOption = arg.Substring(1).Split(new[] { ':', '=' }, 2);
CommandLine\CommandOption.cs (2)
20LongName = part.Substring(2); 24var optName = part.Substring(1);
sdk-tasks (4)
ProcessRuntimeAnalyzerVersions.cs (1)
37var rest = recursiveDir.Substring(slashIndex + 1);
PublishMutationUtilities.cs (1)
28version = targetLibrary.Key.Substring(targetLibrary.Key.IndexOf('/') + 1);
src\sdk\src\Common\WorkloadSetVersion.cs (1)
72? workloadSetVersion.Substring(sections[0].Length)
ZipFileCreateFromDirectory.cs (1)
125return subdirectory.Substring(chop);
SuperFileCheck (1)
Program.cs (1)
332return lineStr.Substring(0, index) + $"{transformSuffix}: {{{{^ *}}}}" + lineStr.Substring(index + syntaxDirective.Length) + "{{$}}";
System.CodeDom (3)
Microsoft\CSharp\CSharpCodeGenerator.cs (2)
2671value = value.Substring(1); 2811sb.Append(CreateEscapedIdentifier(baseType.Substring(lastIndex)));
Microsoft\VisualBasic\VBCodeGenerator.cs (1)
2519sb.Append(CreateEscapedIdentifier(baseType.Substring(lastIndex)));
System.CommandLine (4)
Completions\CompletionContext.cs (1)
92var textAfterCursor = rawInput.Substring(position.Value);
Help\HelpBuilder.cs (1)
366yield return part.Substring(i);
Parsing\StringExtensions.cs (2)
305? arg.Substring(1) 318rest = arg.Substring(i + 1);
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\ReflectionModel\ReflectionProperty.cs (1)
73return name.Substring(4);
System.ComponentModel.TypeConverter (3)
System\ComponentModel\BaseNumberConverter.cs (2)
63return FromString(text.Substring(1), 16); 68return FromString(text.Substring(2), 16);
System\ComponentModel\ComponentResourceManager.cs (1)
158string propName = key.Substring(idx + 1);
System.Configuration.ConfigurationManager (5)
System\Configuration\BaseConfigurationRecord.cs (1)
2151name = configKey.Substring(lastSlash + 1);
System\Configuration\ClientConfigPaths.cs (1)
336if ((lastDot != -1) && (lastDot < ns.Length - 1)) ProductName = ns.Substring(lastDot + 1);
System\Configuration\ConfigPathUtility.cs (1)
97return configPath.Substring(index + 1);
System\Configuration\XmlUtil.cs (1)
898endElement = formattedElement.Substring(iEndElement);
System\Diagnostics\TraceUtils.cs (1)
146string name = className.Substring(SystemDiagnostics.Length);
System.Console (1)
src\runtime\src\libraries\Common\src\System\Text\EncodingHelper.Unix.cs (1)
57locale.Substring(dotPos) : // no modifier
System.Data.Common (5)
System\Data\DataTable.cs (1)
6520string CurrentTableName = CurrentTableFullName.Substring(nsSeparator + 1);
System\Data\XmlDataLoader.cs (1)
944c = collection[XmlConvert.DecodeName(_dataReader.LocalName.Substring(6))];
System\Data\XMLSchema.cs (3)
337propName = propName.Substring(3); 343propName = propName.Substring(4); 1176colName = field.Substring(1);
System.Data.Odbc (3)
Common\System\Data\Common\DbConnectionOptions.cs (3)
297fullPath = rootFolderPath + '\\' + value.Substring(fileNamePosition); 302fullPath = rootFolderPath + value.Substring(fileNamePosition + 1); 307fullPath = rootFolderPath + value.Substring(fileNamePosition);
System.Data.OleDb (4)
DbConnectionOptions.cs (3)
371fullPath = rootFolderPath + '\\' + value.Substring(fileNamePosition); 376fullPath = rootFolderPath + value.Substring(fileNamePosition + 1); 381fullPath = rootFolderPath + value.Substring(fileNamePosition);
OleDbConnectionString.cs (1)
115_expandedConnectionString = _expandedConnectionString!.Substring(0, position) + udlConnectionString + ';' + _expandedConnectionString.Substring(position);
System.Diagnostics.EventLog (2)
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (1)
185string[] splitVersion = majorVersion.Substring(1).Split('.');
System\Diagnostics\EventLog.cs (1)
757return name.Substring(whackPos + 1);
System.Diagnostics.PerformanceCounter (1)
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (1)
185string[] splitVersion = majorVersion.Substring(1).Split('.');
System.Diagnostics.Process (1)
src\runtime\src\libraries\Common\src\System\IO\StringParser.cs (1)
251return _buffer.Substring(_startIndex);
System.DirectoryServices (21)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (3)
945fromSite = fromSite.Substring(3); 1015string serverObject = fromServer.Substring(17); 1024otherSite = otherSite.Substring(3);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLink.cs (1)
719rdn = rdn.Substring(3);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLinkBridge.cs (1)
375rdn = rdn.Substring(3);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnet.cs (1)
77siteName = rdn.Substring(3);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnetCollection.cs (1)
291return str.ToString() + "," + subnetDN.Substring(rdn.Length + 1);
System\DirectoryServices\ActiveDirectory\ApplicationPartition.cs (2)
332string serverName = domainControllerInfo.DomainControllerName.Substring(2); 1177string dcName = domainControllerInfo.DomainControllerName.Substring(2);
System\DirectoryServices\ActiveDirectory\ConfigSet.cs (1)
445adamInstanceNames.Add(bindingInfo.Substring(prefix.Length));
System\DirectoryServices\ActiveDirectory\DomainController.cs (1)
995string domainControllerName = domainControllerInfo.DomainControllerName.Substring(2);
System\DirectoryServices\ActiveDirectory\GlobalCatalog.cs (1)
398string globalCatalogName = domainControllerInfo.DomainControllerName.Substring(2);
System\DirectoryServices\ActiveDirectory\Utils.cs (8)
284string bindingDN = dn.Substring(index + 1); 605username = tmpUsername.Substring(index + 1); 1025serverName = Locator.GetDomainControllerInfo(null, source, null, (long)flag).DomainControllerName.Substring(2); 1035serverName = Locator.GetDomainControllerInfo(null, source, null, (long)flag).DomainControllerName.Substring(2); 1052serverName = Locator.GetDomainControllerInfo(null, source, null, (long)flag).DomainControllerName.Substring(2); 1057serverName = Locator.GetDomainControllerInfo(null, source, null, (long)flag).DomainControllerName.Substring(2); 1924portNumber = serverName.Substring(lastColon + 1); 1945portNumber = serverName.Substring(lastColon + 1);
System\DirectoryServices\DirectoryEntry.cs (1)
893childPath = parentPath + childPath.Substring(parentPath.Length);
System.DirectoryServices.AccountManagement (7)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (1)
130samAccountName = (index != -1) ? samAccountName.Substring(index + 1) : // +1 to skip the '/'
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (1)
445string samAccountName = (index != -1) ? identity.Substring(index + 1) : // +1 to skip the '/'
System\DirectoryServices\AccountManagement\constants.cs (2)
111return "AuthenticablePrincipal" + propertyName.Substring(s_acctInfoPrefixLength); 115return "AuthenticablePrincipal" + propertyName.Substring(s_pwdInfoPrefixLength);
System\DirectoryServices\AccountManagement\SAM\SAMQuerySet.cs (1)
479string samAccountName = (index != -1) ? samToMatch.Substring(index + 1) : // +1 to skip the '/'
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (2)
174return (index != -1) ? Name.Substring(index + 1) : // +1 to skip the '/' 535string samAccountName = (index != -1) ? urnValue.Substring(index + 1) : // +1 to skip the '/'
System.Formats.Tar (2)
System\Formats\Tar\TarEntry.cs (2)
454string relative = normalizedFile.Substring(logicalPrefix.Length) 505string[] components = fullPath.Substring(root.Length)
System.IO.Compression (2)
System\IO\Compression\ZipArchiveEntry.cs (2)
2205path.Substring(i + 1) : 2216path.Substring(i + 1) :
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (2)
201return Directory.EnumerateDirectories(RootDirectory, searchPattern).Select(m => m.Substring(Path.GetDirectoryName(m)!.Length + 1)).ToArray(); 554partialPath = partialPath.Substring(i);
System.IO.Packaging (3)
System\IO\Packaging\PackUriHelper.cs (1)
686partUriExtension = partUriExtension.Substring(1);
System\IO\Packaging\ZipPackage.cs (2)
60string zipItemName = ((PackUriHelper.ValidatedPartUri)partUri).PartUriString.Substring(1); 430return opcName.Substring(1);
System.Management (5)
System\Management\ManagementDateTime.cs (1)
257UtcString = "-" + strTemp.Substring(1).PadLeft(3, '0');
System\Management\ManagementQuery.cs (2)
1029condition = q.Substring(keyword.Length).Trim(); 3127condition = w.Substring(keyword.Length);
System\Management\WMIGenerator.cs (2)
828strTemp = strFirstChar + strTemp.Substring(1); 865strClass = OriginalClassName.Substring(OriginalClassName.IndexOf('_') + 1);
System.Net.Http (11)
System\Net\Http\Headers\ByteArrayHeaderParser.cs (1)
40base64String = value.Substring(index);
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (1)
509string dataString = input.Substring(lastQuoteIndex + 1);
System\Net\Http\Headers\GenericHeaderParser.cs (1)
128string result = value.Substring(startIndex);
System\Net\Http\Headers\HttpHeaderParser.cs (1)
62value == null ? "<null>" : value.Substring(index)));
System\Net\Http\Headers\ProductInfoHeaderValue.cs (1)
91throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, input.Substring(index)));
System\Net\Http\Headers\UriHeaderParser.cs (1)
39uriString = value.Substring(index);
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs (5)
77password = value.Substring(idx + 1); 85value = value.Substring(idx + 1); 181value = value.Substring(hostIndex); 197value = value.Substring(separatorIndex + 1); 206password = auth.Substring(separatorIndex + 1);
System.Net.HttpListener (6)
System\Net\Managed\HttpListenerContext.Managed.cs (2)
44_user = ParseBasicAuthentication(header.Substring(AuthenticationTypes.Basic.Length + 1)); 77password = authString.Substring(colonPos + 1);
System\Net\Managed\ListenerAsyncResult.Managed.cs (1)
146!HttpListenerContext.TryParseBasicAuth(authHeader.Substring(AuthenticationTypes.Basic.Length + 1), out errorCode, out _, out _))
System\Net\Managed\ListenerPrefix.cs (2)
119_path = uri.Substring(root); 126_path = uri.Substring(root);
System\Net\ServiceNameStore.cs (1)
39string hostPortAndDistinguisher = inputServiceName.Substring(shashIndex + 1); // Excludes slash
System.Net.NetworkInformation (1)
src\runtime\src\libraries\Common\src\System\IO\StringParser.cs (1)
251return _buffer.Substring(_startIndex);
System.Net.Requests (1)
System\Net\FtpControlStream.cs (1)
800filename = path.Substring(index + 1);
System.Net.Security (2)
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
490username = username.Substring(index + 1);
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (1)
177string hostPortAndDistinguisher = inputServiceName.Substring(slashIndex + 1); // Excludes slash
System.Net.WebHeaderCollection (1)
System\Net\WebHeaderCollection.cs (1)
318string value = header.Substring(colpos + 1);
System.Private.CoreLib (20)
src\runtime\src\libraries\Common\src\System\IO\StringParser.cs (1)
251return _buffer.Substring(_startIndex);
src\runtime\src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (3)
38str = str.Substring(2); 141str = str.Substring(2); 251str = str.Substring(2);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ManifestBuilder.cs (1)
601string evtName = key.Substring("event_".Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (1)
804metaData.AddRange(Encoding.UTF8.GetBytes(value.Substring(1)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
2031string symbol = dateWords[i].Substring(1);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs (1)
53expression = expression.Substring(directoryName.Length + 1);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\SharedMemoryManager.Unix.cs (2)
31name = name.Substring("Global\\".Length); 38name = name.Substring("Local\\".Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (2)
160s = s.Substring(pos); 207string result = s.Substring(pos);
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
1967splitStrings[arrIndex] = Substring(currIndex);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Mutex.Unix.cs (1)
62name = name.Substring(NamedWaitHandleOptionsInternal.CurrentSessionPrefix.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.Unix.cs (1)
286return timeZoneId.Substring(i + 1).Replace('_', ' ');
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
1116zoneAbbreviations.Substring(index);
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (4)
209timeZoneId = zoneTabFileLine.Substring(startIndex); 232result = result.Substring(1); 256id = symlinkPath.Substring(timeZoneDirectory.Length); 334id = id.Substring(timeZoneDirectory.Length);
System.Private.DataContractSerialization (13)
System\Runtime\Serialization\DataContract.cs (3)
1498typeName = DataContract.GetClrTypeFullName(type).Substring(nsLen).Replace('+', '.'); 1714localName = fullTypeName.Substring(nsEnd + 1).Replace('+', '.'); 1723return uriString.StartsWith(Globals.DataContractXsdBaseNamespace, StringComparison.Ordinal) ? uriString.Substring(Globals.DataContractXsdBaseNamespace.Length) : uriString;
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (1)
46ns = qname.Substring(colon + 1);
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (3)
175serverTypeNamespace = serverTypeNamespace.Substring(1); 208serverTypeNamespace = serverTypeNamespace.Substring(1); 236ns = qname.Substring(colon + 1);
System\Runtime\Serialization\SchemaExporter.cs (1)
278typeName = DataContract.GetClrTypeFullName(clrType).Substring(nsLen).Replace('+', '.');
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (1)
445name = qname.Substring(colon + 1);
System\Xml\XmlBaseReader.cs (3)
536localName = name.Substring(index + 1); 1022localName = name.Substring(index + 1); 1150_value = value.Substring(actual);
System\Xml\XmlConverter.cs (1)
461localName = qname.Substring(index + 1).Trim();
System.Private.Uri (5)
System\Uri.cs (3)
660relativeStr = relativeStr.Substring(i + 1); 731path = path.Substring(1); 903result = result.Substring(1);
System\UriBuilder.cs (2)
87_fragment = extraValue.Substring(fragmentIndex); 320_password = userInfo.Substring(index + 1);
System.Private.Xml (43)
System\Xml\BinaryXml\XmlBinaryReader.cs (1)
1938lnameStr = _xnt.Add(prefixStr.Substring(6));
System\Xml\Core\XmlCharCheckingWriter.cs (1)
160text = text.Substring(i + 2);
System\Xml\Core\XmlCharCheckingWriterAsync.cs (1)
109text = text.Substring(i + 2);
System\Xml\Core\XmlTextReaderImpl.cs (2)
5818_curNode.SetValue(_curNode.StringValue.Substring(_readValueOffset)); 5834_curNode.SetValue(_curNode.StringValue.Substring(_readValueOffset));
System\Xml\Core\XmlTextReaderImplAsync.cs (2)
3577_curNode.SetValue(_curNode.StringValue.Substring(_readValueOffset)); 3593_curNode.SetValue(_curNode.StringValue.Substring(_readValueOffset));
System\Xml\Dom\XmlNode.cs (1)
1296localName = name.Substring(colonPos + 1);
System\Xml\Schema\DtdParser.cs (2)
284_nameTable.Add(docTypeName.Substring(colonPos + 1))); 1483Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
System\Xml\Schema\DtdParserAsync.cs (1)
1108Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
System\Xml\Schema\XdrBuilder.cs (1)
523Uri ruri = _xmlResolver.ResolveUri(_baseUri, uri.Substring(x_schema.Length));
System\Xml\Schema\XdrValidator.cs (1)
339string url = uri.Substring(x_schema.Length);
System\Xml\Schema\XmlSchemaDataType.cs (1)
258canonicalUri = nameTable.Add(string.Concat(uri.AsSpan(0, offset), uri.Substring(offset).ToUpperInvariant()));
System\Xml\Serialization\Mappings.cs (2)
121return new XmlQualifiedName(XmlConvert.EncodeLocalName(name.Substring(colon + 1)), XmlConvert.EncodeLocalName(name.Substring(0, colon))).ToString(); 259Name = Name.Substring("xml:".Length);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (1)
480string choiceName = colon < 0 ? xmlName : xmlName.Substring(colon + 1);
System\Xml\Serialization\Types.cs (1)
1472dims = type.Substring(nameLen);
System\Xml\Serialization\XmlReflectionImporter.cs (2)
2030string choiceName = colon < 0 ? xmlName : xmlName.Substring(colon + 1); 2152string choiceName = colon < 0 ? choiceId : choiceId.Substring(colon + 1);
System\Xml\Serialization\XmlSerializationILGen.cs (2)
581System.Diagnostics.Debug.Assert(memberInfos.ContainsKey(source.Substring(3))); 582MemberInfo memInfo = memberInfos[source.Substring(3)];
System\Xml\Serialization\XmlSerializationReader.cs (3)
1178string localName = value!.Substring(colon + 1); 1463fixupReference = href.Substring(1); 1957xsiTypeName = (colon >= 0) ? value.Substring(colon + 1) : value;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (4)
2907Debug.Assert(memberInfos.ContainsKey(source.Substring(3))); 2908MemberInfo memInfo = memberInfos[source.Substring(3)]; 3071Debug.Assert(memberInfos.ContainsKey(source.Substring(3))); 3072memberMapping.MemberInfo = memberInfos[source.Substring(3)];
System\Xml\Serialization\XmlSerializationWriter.cs (2)
1024_w.WriteAttributeString(prefix, localName.Substring(colon + 1), ns, value); 1051_w.WriteStartAttribute(prefix, localName.Substring(colon + 1), ns);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
2303string choiceName = colon < 0 ? xmlName : xmlName.Substring(colon + 1); 2545Debug.Assert(initValue.MemberInfo.Name == initValue.Arg.Substring(3));
System\Xml\ValidateNames.cs (2)
290localName = s.Substring(colonOffset + 1); 615lname = name.Substring(colonPos);
System\Xml\XPath\Internal\StringFunctions.cs (2)
162return (idx < 0) ? string.Empty : s1.Substring(idx + s2.Length); 203return str1.Substring((int)num);
System\Xml\Xsl\IlGen\XmlILTrace.cs (1)
201return s.Substring(4);
System\Xml\Xsl\Runtime\XmlCollation.cs (2)
183string lang = collationUri.LocalPath.Substring(1); 221foreach (string option in query.Substring(1).Split('&'))
System\Xml\Xsl\Runtime\XsltFunctions.cs (3)
53return (idx < 0) ? string.Empty : s1.Substring(idx + s2.Length); 65return value.Substring((int)startIndex - 1); 499return name.Substring(colonOffset + 1);
System.Private.Xml.Linq (1)
System\Xml\Linq\XNodeReader.cs (1)
1150localName = qualifiedName.Substring(i + 1);
System.Reflection.Context (1)
System\Reflection\Context\Custom\CustomType.cs (1)
216string targetPropertyName = name.Substring(4);
System.Reflection.Metadata (1)
System\Reflection\Internal\Utilities\PathUtilities.cs (1)
52return (fileNameStart <= 0) ? path : path.Substring(fileNameStart);
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\General\Helpers.cs (1)
208name = fullName.Substring(indexOfLastDot + 1);
System\Reflection\TypeLoading\Modules\RoModule.cs (1)
57return s.Substring(i + 1);
System.Resources.Extensions (1)
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
472typeName = typeName.Substring(17); // Remove through '.'
System.Resources.Writer (1)
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
472typeName = typeName.Substring(17); // Remove through '.'
System.Runtime.InteropServices.JavaScript (4)
System\Runtime\InteropServices\JavaScript\JSException.cs (1)
71jsStackTrace = jsStackTrace.Substring(Message.Length + 1);
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (3)
339fqn = fqn.Substring(SmallIndexOf(fqn, ']') + 1); 341var methodName = fqn.Substring(SmallIndexOf(fqn, ':') + 1); 351shortClassName = className.Substring(idx + 1);
System.Runtime.Serialization.Schema (4)
System\Runtime\Serialization\Schema\CodeExporter.cs (3)
488string nestedTypeName = XmlConvert.DecodeName(originalName.Substring(nestedTypeIndex + 1)); 1135string expectedName = (nestedTypeIndex <= 0 || nestedTypeIndex == dataContractName.Length - 1) ? dataContractName : dataContractName.Substring(nestedTypeIndex + 1); 1548AddToNamespace(builder, uriString.Substring(ImportGlobals.DataContractXsdBaseNamespace.Length), fragments);
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (1)
105return uriString.StartsWith(ImportGlobals.DataContractXsdBaseNamespace, StringComparison.Ordinal) ? uriString.Substring(ImportGlobals.DataContractXsdBaseNamespace.Length) : uriString;
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\Utils.cs (2)
311string idref = uri.Substring(1); 335string idref = uri.Substring(1);
System.ServiceModel.Http (2)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
729uriBuilder.Query = requestProperty.QueryString.Substring(1);
System\ServiceModel\Channels\HttpTransportSecurityHelpers.cs (1)
55return value.Substring(5);
System.ServiceModel.Primitives (13)
Internals\System\Runtime\UrlUtility.cs (2)
49query = query.Substring(1); 76return UrlPathEncode(str.Substring(0, i)) + str.Substring(i);
Internals\System\Xml\XmlMtomReader.cs (2)
410contentID = string.Format(CultureInfo.InvariantCulture, "<{0}>", Uri.UnescapeDataString(uri.Substring(MimeGlobals.ContentIDScheme.Length))); 1349_stringValue = _stringValue.Substring(consumed * 2);
System\IdentityModel\Tokens\WSSecurityJan2004.cs (1)
422SecurityKeyIdentifierClause clause = new LocalIdKeyIdentifierClause(uri.Substring(1), derivationNonce, derivationLength, tokenTypes);
System\ServiceModel\Channels\BindingContext.cs (1)
113builder.Append(typeString.Substring(typeString.LastIndexOf('.') + 1));
System\ServiceModel\Channels\ChannelRequirements.cs (2)
278contractChannelTypes.Append(typeString.Substring(typeString.LastIndexOf('.') + 1)); 322bindingChannelTypes.Append(typeString.Substring(typeString.LastIndexOf('.') + 1));
System\ServiceModel\Channels\TextMessageEncoder.cs (1)
194charSet = contentType.Substring(charsetValueIndex);
System\ServiceModel\Description\ServiceReflector.cs (2)
41return baseUri + (path.StartsWith("/", StringComparison.Ordinal) ? path.Substring(1) : path); 967return method.Name.Substring(BeginMethodNamePrefix.Length);
System\ServiceModel\XmlUtil.cs (2)
83return s.Substring(i); 134localName = TrimEnd(qname.Substring(index + 1));
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceController.cs (1)
346Interop.Advapi32.ENUM_SERVICE_STATUS_PROCESS[] loadGroup = GetServicesInGroup(_machineName, dependencyNameStr.Substring(1));
System.Speech (17)
Internal\ObjectToken\RegistryDataKey.cs (2)
304return _sKeyId.Substring(iPosSlash + 1); 475registryPath = registryPath.Substring(index + 1);
Internal\ObjectToken\SAPICategories.cs (1)
44using (RegistryDataKey deviceKey = RegistryDataKey.Create(deviceName.Substring(pos + 1), Registry.LocalMachine))
Internal\SrgsCompiler\AppDomainGrammarProxy.cs (1)
287pairs[i]._value = parameter.Substring(posColon + 1);
Internal\SrgsCompiler\BackEnd.cs (3)
581ruleName = arc.RuleRef.Name.Substring(12); 594ruleName = arc.RuleRef.Name.Substring(11); 1150string ruleName = posDynamic != 0 ? srcToState.Rule.Name : srcToState.Rule.Name.Substring(12);
Internal\SrgsCompiler\RuleRef.cs (2)
44ruleRef = GetRuleRef(backend, id.Substring(1), undefRules); 60sbExternalRuleUri.Append(id.Substring(posPound));
Internal\SrgsParser\XmlParser.cs (4)
52_shortFilename = iPosSlash >= 0 ? _filename.Substring(iPosSlash + 1) : _filename; 1706XmlParser.ThrowSrgsException(SRID.IncorrectAttributeValue, name, sTag.Substring(iEqual)); 1713string sValue = sTag.Substring(iEqual); 1783maxRepeat = Convert.ToInt32(repeat.Substring(sep + 1), CultureInfo.InvariantCulture);
Recognition\Grammar.cs (1)
867pairs[i]._value = parameter.Substring(posColon + 1);
Recognition\RecognizerBase.cs (2)
1447string? topicName = string.IsNullOrEmpty(uri.Fragment) ? null : uri.Fragment.Substring(1); 1491onInitParameters = bstrResourceUri.Substring(posGreaterThan + 1);
Recognition\SrgsGrammar\SrgsRuleRef.cs (1)
197sUri = sUri.Substring(1);
System.Text.Json (1)
System\Text\Json\ThrowHelper.Serialization.cs (1)
507message = $"{message.Substring(0, iPos)} Path: {path} |{message.Substring(iPos)}";
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Emitter.cs (1)
1331string typeArgsList = closedTypeArgs.Substring(openAngle);
JsonSourceGenerator.Parser.cs (1)
3425return display.Substring(whereIndex + 1);
System.Text.RegularExpressions (6)
System\Text\RegularExpressions\Regex.Split.cs (1)
321state.results.Add(input.Substring(state.prevat));
System\Text\RegularExpressions\RegexCharClass.cs (1)
2015desc.Append('-').Append(DescribeSet(set.Substring(endPosition), forceBrackets: true));
System\Text\RegularExpressions\RegexCompiler.cs (1)
2098new(RegexNodeKind.Multi, multi.Options, multi.Str.Substring(1));
System\Text\RegularExpressions\RegexNode.cs (2)
1517node.Str = node.Str.Substring(startingSpan.Length); 1987nextNode.Str = nextNode.Str.Substring(matchingCharsInMulti);
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (1)
453subtractorCond = CreateBDDFromSetString(set.Substring(i));
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Emitter.cs (1)
1981new(RegexNodeKind.Multi, multi.Options, multi.Str.Substring(1));
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (1)
2015desc.Append('-').Append(DescribeSet(set.Substring(endPosition), forceBrackets: true));
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (2)
1517node.Str = node.Str.Substring(startingSpan.Length); 1987nextNode.Str = nextNode.Str.Substring(matchingCharsInMulti);
System.Web.HttpUtility (1)
System\Web\Util\UriUtil.cs (1)
47path = inputWithoutQueryFragment.Substring(schemeAndAuthorityLength);
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonKeyTipAndContentSyncHelper.cs (1)
155return string.Concat(stringContent.Substring(0, accessorIndex), '_', stringContent.Substring(accessorIndex));
System.Windows.Forms.Analyzers.CSharp (4)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.FontConverter.cs (4)
58style = font.Substring(styleIndex); 66sizeStr = font.Substring(nameIndex + 1); 96style = style.Substring(6); // style string always starts with style= 168units = text.Substring(splitPoint);
System.Xaml (7)
System\Xaml\Parser\MeScanner.cs (1)
246value = value.Substring(2);
System\Xaml\Parser\XamlPropertyName.cs (1)
55string name = (start == 0) ? dottedName : dottedName.Substring(start);
System\Xaml\Parser\XamlQualifiedName.cs (1)
91name = (start==0) ? longName : longName.Substring(start);
System\Xaml\Schema\ClrNamespaceUriParser.cs (2)
42clrNs = uriInput.Substring(clrNsStartIdx); 65assemblyName = uriInput.Substring(equalIdx + 1);
System\Xaml\Schema\TypeReflector.cs (2)
922name = mi.Name.Substring(KnownStrings.Get.Length); 946name = mi.Name.Substring(KnownStrings.Set.Length);
vbc (2)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (2)
148return @"\\" + s.Substring(8); 150return s.Substring(4);
VBCSCompiler (2)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (2)
148return @"\\" + s.Substring(8); 150return s.Substring(4);
vstest.console (6)
CommandLine\CommandArgumentPair.cs (1)
76Argument = input.Substring(index + 1);
CommandLine\Executor.cs (1)
526string path = arg.Substring(1).TrimEnd(null);
Internal\FilePatternParser.cs (1)
120string pattern = filePattern.Substring(directorySeparatorIndex + 1);
Processors\CLIRunSettingsArgumentProcessor.cs (1)
199var value = arg.Substring(indexOfSeparator + 1);
Processors\EnableCodeCoverageArgumentProcessor.cs (1)
271var nonExistingPath = fullpath.Substring(existingPath.Length);
Processors\EnvironmentArgumentProcessor.cs (1)
103value = key.Substring(key.IndexOf("=", StringComparison.Ordinal) + 1);
vstest.console.arm64 (6)
src\vstest\src\vstest.console\CommandLine\CommandArgumentPair.cs (1)
76Argument = input.Substring(index + 1);
src\vstest\src\vstest.console\CommandLine\Executor.cs (1)
526string path = arg.Substring(1).TrimEnd(null);
src\vstest\src\vstest.console\Internal\FilePatternParser.cs (1)
120string pattern = filePattern.Substring(directorySeparatorIndex + 1);
src\vstest\src\vstest.console\Processors\CLIRunSettingsArgumentProcessor.cs (1)
199var value = arg.Substring(indexOfSeparator + 1);
src\vstest\src\vstest.console\Processors\EnableCodeCoverageArgumentProcessor.cs (1)
271var nonExistingPath = fullpath.Substring(existingPath.Length);
src\vstest\src\vstest.console\Processors\EnvironmentArgumentProcessor.cs (1)
103value = key.Substring(key.IndexOf("=", StringComparison.Ordinal) + 1);