112 references to Trim
Aspire.Dashboard (1)
Extensions\StringExtensions.cs (1)
44var s = name.AsSpan().Trim();
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
ILLink.RoslynAnalyzer (1)
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (1)
108if (s.Length != span.Trim().Length || span.IndexOfAny('\"', '\'') >= 0)
Metrics (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Metrics.Legacy (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.AspNetCore.HeaderParsing (1)
Parsers\IPAddressListParser.cs (1)
38var addressToParse = value.AsSpan(startIndex, length).Trim();
Microsoft.AspNetCore.Mvc.Razor (1)
TagHelpers\UrlResolutionTagHelper.cs (1)
331key = value.AsSpan()[2..keyEnd].Trim();
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\Request.cs (1)
538if (transferEncoding.AsSpan().Slice(index + 1).Trim().Equals("chunked", StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.cs (1)
913if (transferEncoding.AsSpan().Slice(index + 1).Trim().Equals("chunked", StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.WebSockets (1)
HandshakeHelpers.cs (1)
95ReadOnlySpan<char> value = (end >= 0 ? extension[..end] : extension).Trim();
Microsoft.AspNetCore.WebUtilities (1)
MultipartReaderStream.cs (1)
232remainder = remainder.Trim();
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (2)
61var commentText = GetTextContextOfComment(trivia).Span.Trim(); 78var triviaStringParts = commentText.Span.Trim().ToString().Replace("\r\n", "\n").Split('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.CodeAnalysis.Features (2)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (2)
61var commentText = GetTextContextOfComment(trivia).Span.Trim(); 78var triviaStringParts = commentText.Span.Trim().ToString().Replace("\r\n", "\n").Split('\n');
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Microsoft.Extensions.AI.Abstractions (2)
Contents\DataUriParser.cs (2)
62ReadOnlySpan<char> span = metadata.Span.Trim(); 135span = span.Trim();
Microsoft.Extensions.AI.Evaluation.Quality (1)
Utilities\JsonOutputFixer.cs (1)
22trimmed = trimmed.Trim().Trim(['`']);
Microsoft.Extensions.Configuration.Ini (1)
IniStreamConfigurationProvider.cs (1)
53sectionPrefix = string.Concat(line.AsSpan(1, line.Length - 2).Trim(), ConfigurationPath.KeyDelimiter);
Microsoft.Maui.Graphics (2)
Color.cs (2)
594 value = value.Trim(); 999 elem = elem.Trim();
PresentationCore (6)
System\Windows\DurationConverter.cs (1)
52ReadOnlySpan<char> valueSpan = stringValue.AsSpan().Trim();
System\Windows\Input\Command\MouseActionConverter.cs (1)
58ReadOnlySpan<char> mouseActionToken = mouseAction.AsSpan().Trim();
System\Windows\Input\InputScopeConverter.cs (1)
108spanSource = spanSource.Trim();
System\Windows\Media\Knowncolors.cs (1)
814ReadOnlySpan<char> argbSpan = argbString.AsSpan().Trim();
System\Windows\TextDecorationCollectionConverter.cs (2)
84ReadOnlySpan<char> decorationsSpan = text.AsSpan().Trim(); 94ReadOnlySpan<char> decoration = decorationsSpan[segment].Trim();
PresentationFramework (8)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (2)
518if (!xValue.Trim().IsEmpty && !yValue.Trim().IsEmpty)
System\Windows\Controls\DataGridLengthConverter.cs (1)
194ReadOnlySpan<char> valueSpan = s.AsSpan().Trim();
System\Windows\Documents\FixedSchema.cs (2)
437ReadOnlySpan<char> attrValueSpan = attrValue.AsSpan().Trim(); 440attrValueSpan = attrValueSpan.Slice(_contextColor.Length).Trim();
System\Windows\LengthConverter.cs (1)
189ReadOnlySpan<char> valueSpan = s.AsSpan().Trim();
System\Windows\Markup\XamlFigureLengthSerializer.cs (1)
179ReadOnlySpan<char> valueSpan = s.AsSpan().Trim();
System\Windows\Markup\XamlGridLengthSerializer.cs (1)
179ReadOnlySpan<char> valueSpan = s.AsSpan().Trim();
PresentationUI (1)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (1)
1857zoomString = zoomString.Trim();
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
System.ComponentModel.TypeConverter (7)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (1)
91text = text.Trim();
System\ComponentModel\Design\PropertyTabAttribute.cs (2)
112className = _tabClassNames[i].AsSpan(0, commaIndex).Trim().ToString(); 113assemblyName = _tabClassNames[i].AsSpan(commaIndex + 1).Trim().ToString();
System\Drawing\PointConverter.cs (1)
29ReadOnlySpan<char> text = strValue.AsSpan().Trim();
System\Drawing\RectangleConverter.cs (1)
29ReadOnlySpan<char> text = strValue.AsSpan().Trim();
System\Drawing\SizeConverter.cs (1)
29ReadOnlySpan<char> text = strValue.AsSpan().Trim();
System\Drawing\SizeFConverter.cs (1)
29ReadOnlySpan<char> text = strValue.AsSpan().Trim();
System.Data.Common (2)
System\Data\DataTable.cs (2)
3722current = current.AsSpan(0, length - 4).Trim().ToString(); 3727current = current.AsSpan(0, length - 5).Trim().ToString();
System.Diagnostics.DiagnosticSource (11)
System\Diagnostics\DsesFilterAndTransform.cs (7)
224.Trim(); 229activitySourceName = entry.Slice(0, eventNameIndex).Trim(); 231ReadOnlySpan<char> suffixPart = entry.Slice(eventNameIndex + 1).Trim(); 236eventName = suffixPart.Slice(0, samplingResultIndex).Trim(); 237suffixPart = suffixPart.Slice(samplingResultIndex + 1).Trim(); 331activityName = activitySourceName.Slice(plusSignIndex + 1).Trim().ToString(); 332activitySourceName = activitySourceName.Slice(0, plusSignIndex).Trim();
System\Diagnostics\Metrics\MetricsEventSource.cs (4)
775ReadOnlySpan<char> spec = specString.AsSpan(0, index).Trim(); 776ReadOnlySpan<char> value = specString.AsSpan(index + 1).Trim(); 939string meterName = text.AsSpan(0, slashIdx).Trim().ToString(); 940string? instrumentName = text.AsSpan(slashIdx + 1).Trim().ToString();
System.Drawing.Primitives (1)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (1)
91text = text.Trim();
System.Net.Http (1)
src\libraries\Common\src\System\Net\HttpDateParser.cs (1)
42input = input.Trim();
System.Net.HttpListener (5)
src\libraries\Common\src\System\Net\CookieParser.cs (1)
143_tokenStream.AsSpan(_start, _tokenLength).Trim().ToString();
System\Net\HttpListenerRequest.cs (2)
340attrValue = headerValue.AsSpan(i + 1, j - i - 1).Trim().ToString(); 353attrValue = headerValue.AsSpan(i, j - i).Trim().ToString();
System\Net\Managed\HttpListenerRequest.Managed.cs (2)
218string name = header.AsSpan(0, colon).Trim().ToString(); 219string val = header.AsSpan(colon + 1).Trim().ToString();
System.Net.Mail (3)
System\Net\Mail\MailAddressParser.cs (1)
425displayName = data.AsSpan(index + 1, startingIndex - index).Trim().ToString();
System\Net\Mime\SmtpDateTime.cs (2)
258ReadOnlySpan<char> date = data.AsSpan(0, indexOfTimeZoneSeparator).Trim(); 272ReadOnlySpan<char> timeZoneSpan = data.AsSpan(indexOfTimeZoneSeparator).Trim();
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\StringParsingHelpers.Misc.cs (1)
104if (!int.TryParse(ReadAllText(filePath).AsSpan().Trim(), out ret))
System.Net.Primitives (1)
src\libraries\Common\src\System\Net\CookieParser.cs (1)
143_tokenStream.AsSpan(_start, _tokenLength).Trim().ToString();
System.Net.Requests (4)
src\libraries\Common\src\System\Net\HttpDateParser.cs (1)
42input = input.Trim();
System\Net\HttpWebResponse.cs (3)
278if (srchString.AsSpan().Trim().StartsWith("text/", StringComparison.Ordinal)) 314_characterSet = contentType.AsSpan(i, j - i).Trim().ToString(); 316_characterSet = contentType.AsSpan(i).Trim().ToString();
System.Net.Security (1)
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
501domain = domain.Trim();
System.Net.WebHeaderCollection (3)
System\Net\HeaderInfoTable.cs (3)
38ReadOnlySpan<char> singleValue = value.AsSpan(startIndex, length).Trim(); 53tempStringCollection.Add(value.AsSpan(startIndex, length).Trim().ToString()); 77return lastElement.Slice(0, equalsPos).Trim().Equals("Expires", StringComparison.OrdinalIgnoreCase);
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
317ReadOnlySpan<char> value = (end >= 0 ? extension[..end] : extension).Trim();
System.Private.CoreLib (15)
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (1)
108if (s.Length != span.Trim().Length || span.IndexOfAny('\"', '\'') >= 0)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (2)
1063subvalue = value.Trim(); 1069subvalue = value.Slice(0, endIndex).Trim();
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanParse.cs (1)
696input = input.Trim();
src\libraries\System.Private.CoreLib\src\System\Guid.cs (2)
414input = input.Trim(); 449input = input.Trim();
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (1)
918return Unsafe.BitCast<ReadOnlySpan<char>, ReadOnlySpan<TChar>>(Unsafe.BitCast<ReadOnlySpan<TChar>, ReadOnlySpan<char>>(span).Trim());
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
579return asmTypeName.AsSpan(firstComma + 1, simpleAsmNameLength).Trim().Equals("mscorlib", StringComparison.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\FrameworkName.cs (3)
127_identifier = frameworkNameSpan[components[0]].Trim().ToString(); 152ReadOnlySpan<char> key = component.Slice(0, separatorIndex).Trim(); 153ReadOnlySpan<char> value = component.Slice(separatorIndex + 1).Trim();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (3)
1919thisEntry = thisEntry.Trim(); 1938thisEntry = thisEntry.Trim(); 1959thisEntry = thisEntry.Trim();
src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (1)
501ReadOnlySpan<char> str = filterCriteriaString.AsSpan().Trim();
System.Private.Xml (1)
System\Xml\Serialization\Xmlcustomformatter.cs (1)
451return XmlConvert.FromBinHexString(value.AsSpan().Trim(), true);
System.Reflection.Metadata (1)
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (1)
108if (s.Length != span.Trim().Length || span.IndexOfAny('\"', '\'') >= 0)
System.Windows.Forms (6)
System\Resources\ResXResourceReader.cs (1)
450return typeName.AsSpan(0, index).Trim().ToString();
System\Windows\Forms\Controls\Labels\LinkArea.LinkAreaConverter.cs (1)
54ReadOnlySpan<char> text = valueStr.AsSpan().Trim();
System\Windows\Forms\Controls\Labels\LinkConverter.cs (1)
50ReadOnlySpan<char> text = valueStr.AsSpan().Trim();
System\Windows\Forms\Controls\MonthCalendar\SelectionRangeConverter.cs (1)
54ReadOnlySpan<char> text = valueAsString.AsSpan().Trim();
System\Windows\Forms\Controls\WebBrowser\WebBrowserUriTypeConverter.cs (1)
19uri = new Uri($"http://{uri.OriginalString.AsSpan().Trim()}");
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanelCellPositionTypeConverter.cs (1)
37ReadOnlySpan<char> text = stringValue.AsSpan().Trim();
System.Windows.Forms.Primitives (1)
System\Windows\Forms\PaddingConverter.cs (1)
27ReadOnlySpan<char> text = stringValue.AsSpan().Trim();
Test.Utilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
98switch (value.Trim())