105 references to StartsWith
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
387if (devtoolsFrontendUrl.AsSpan().TrimStart('/').StartsWith(DefaultBrowserDevToolsPagePath))
Microsoft.AspNetCore.Mvc.Razor (1)
TagHelpers\UrlResolutionTagHelper.cs (1)
296if (!url.StartsWith("~/"))
Microsoft.AspNetCore.Routing (1)
Matching\HostMatcherPolicy.cs (1)
110host.StartsWith(WildcardPrefix) &&
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\PathNormalizer\PathNormalizer.cs (1)
59else if (MemoryMarshal.CreateSpan(ref src[nextIndex], 2).StartsWith(dotSlash))
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\PathNormalizer\PathNormalizer.cs (1)
59else if (MemoryMarshal.CreateSpan(ref src[nextIndex], 2).StartsWith(dotSlash))
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\Shared\PathNormalizer\PathNormalizer.cs (1)
59else if (MemoryMarshal.CreateSpan(ref src[nextIndex], 2).StartsWith(dotSlash))
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\PathNormalizer\PathNormalizer.cs (1)
59else if (MemoryMarshal.CreateSpan(ref src[nextIndex], 2).StartsWith(dotSlash))
Microsoft.AspNetCore.WebSockets (2)
HandshakeHelpers.cs (2)
133else if (value.StartsWith(WebSocketDeflateConstants.ClientMaxWindowBits)) 178else if (value.StartsWith(WebSocketDeflateConstants.ServerMaxWindowBits))
Microsoft.CodeAnalysis.CSharp (2)
Parser\LanguageParser_InterpolatedString.cs (2)
187if (!currentLineWhitespace.StartsWith(indentationWhitespace)) 196var isLegalBlankLine = isBlankLine && indentationWhitespace.StartsWith(currentLineWhitespace);
Microsoft.CodeAnalysis.Workspaces (1)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
125if (!docCommentId.Span.StartsWith(expectedDocCommentId))
Microsoft.Extensions.AI.Evaluation.NLP (5)
Common\SimpleWordTokenizer.cs (5)
94if (span.StartsWith(""".AsSpan())) 106else if (span.StartsWith("&".AsSpan())) 118else if (span.StartsWith("<".AsSpan())) 130else if (span.StartsWith(">".AsSpan())) 142else if (span.StartsWith("'".AsSpan()))
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\ServerSentEvents\SseParser_1.cs (1)
396advance = line.Length + newlineLength + (remainder.StartsWith(CRLF) ? 2 : 1);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (4)
Linux\LinuxUtilizationParserCgroupV1.cs (2)
132if (!bufferWriter.Buffer.WrittenSpan.StartsWith(StartingTokens)) 269if (!firstLine.StartsWith(MemTotal))
Linux\LinuxUtilizationParserCgroupV2.cs (2)
176if (!bufferWriter.Buffer.WrittenSpan.StartsWith(StartingTokens)) 414if (!firstLine.StartsWith(MemTotal))
Microsoft.Extensions.Http.Diagnostics (1)
Http\DownstreamDependencyMetadataManager.cs (1)
107if (routeSpan.StartsWith("//".AsSpan()))
Microsoft.ML.Tokenizers.Tests (4)
LlamaTests.cs (4)
850Assert.True(decodedWithNoSpecialTokens.AsSpan().StartsWith(destinationBuffer.AsSpan().Slice(0, charactersWritten))); 864Assert.True(textWithSpecialTokens.AsSpan().StartsWith(destinationBuffer.AsSpan().Slice(0, charactersWritten))); 889Assert.True(decodedWithNoSpecialTokens.AsSpan().StartsWith(destinationBuffer.AsSpan().Slice(0, charactersWritten))); 908Assert.True(textWithSpecialTokens.AsSpan().StartsWith(sp));
PresentationFramework (1)
System\Windows\Controls\VirtualizingStackPanel.cs (1)
12238isWPFControl = name.StartsWith("System.Windows.Controls.");
Shared (1)
ServerSentEvents\SseParser_1.cs (1)
396advance = line.Length + newlineLength + (remainder.StartsWith(CRLF) ? 2 : 1);
System.Memory (2)
System\Buffers\SequenceReader.Search.cs (2)
791if (unread.StartsWith(next)) 814while (next.StartsWith(currentSpan))
System.Net.Mail (1)
System\Net\Mime\ByteEncoder.cs (1)
33if (_hasSpecialEncodingForCRLF && buffer.Slice(cur).StartsWith("\r\n"u8))
System.Net.ServerSentEvents (3)
System\Net\ServerSentEvents\SseParser_1.cs (3)
277return _lineBuffer.AsSpan(_newlineIndex, _lineLength - (_newlineIndex - _lineOffset)).StartsWith(CRLF) ? 2 : 1; 379advance = line.Length + newlineLength + (remainder.StartsWith(CRLF) ? 2 : 1); 526if (_lineBuffer.AsSpan(0, _lineLength).StartsWith(Utf8Bom))
System.Net.WebClient (2)
System\Net\WebClient.cs (2)
1141if (data.AsSpan().StartsWith(preamble)) 1157bomLengthInData = data.AsSpan().StartsWith(preamble) ? preamble.Length : 0;
System.Net.WebSockets.Client (3)
System\Net\WebSockets\WebSocketHandle.Managed.cs (3)
184if (extension.AsSpan().TrimStart().StartsWith(ClientWebSocketDeflateConstants.Extension)) 329else if (value.StartsWith(ClientWebSocketDeflateConstants.ClientMaxWindowBits)) 333else if (value.StartsWith(ClientWebSocketDeflateConstants.ServerMaxWindowBits))
System.Private.CoreLib (13)
src\libraries\Common\src\Interop\Linux\os-release\Interop.OSReleaseFile.cs (1)
61if (!line.StartsWith(prefix))
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcMountInfo.cs (1)
37if (!path.StartsWith(mount.MountPoint))
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (2)
552return source.StartsWith(prefix); 564return source.StartsWith(prefix);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Utf8.cs (2)
49return source.StartsWith(prefix); 61return source.StartsWith(prefix);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (1)
5682if (++Index < Length && Value.Slice(Index).StartsWith(str))
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (1)
3554StartsWith((ReadOnlySpan<T>)span, value);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.cs (1)
351return span.StartsWith(value);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.Utf8.cs (1)
53return span.StartsWith(value);
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (2)
311if (!positiveSign.IsEmpty && value.StartsWith(positiveSign)) 321else if (!negativeSign.IsEmpty && value.StartsWith(negativeSign))
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (1)
192if (!_inputString.TrimStart().StartsWith(","))
System.Private.Windows.Core (3)
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
157if (isSerializedObject = bytes.AsSpan().StartsWith(s_serializedObjectID))
System\SpanReader.cs (2)
193public readonly bool IsNext(params ReadOnlySpan<T> next) => _unread.StartsWith(next); 203if (_unread.StartsWith(next))
System.Private.Xml (37)
System\Xml\Core\XmlTextReaderImpl.cs (19)
3197if (_ps.bytes.AsSpan(0, _ps.bytesUsed).StartsWith(preamble)) 3594if (!_ps.chars.AsSpan(_ps.charPos).StartsWith(XmlDeclarationBeginning) || 3784if (_ps.chars.AsSpan(_ps.charPos).StartsWith("1.0")) 3946if (chars.AsSpan(pos).StartsWith("CDATA[")) 4166if (chars.AsSpan(pos).StartsWith("CDATA[")) 4373if (prefixLen == _lastPrefix.Length && chars.AsSpan(startPos).StartsWith(_lastPrefix)) 4549if (!chars.AsSpan(_ps.charPos).StartsWith(startTagNode.localName)) 4558if (!chars.AsSpan(_ps.charPos).StartsWith(startTagNode.prefix) || 4560!chars.AsSpan(colonPos + 1).StartsWith(startTagNode.localName)) 6681if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("DOCTYPE")) 6763if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("PUBLIC")) 6800if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("SYSTEM")) 7674if (prefixLen == _lastPrefix.Length && _ps.chars.AsSpan(_ps.charPos).StartsWith(_lastPrefix)) 8223Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 2).StartsWith("?>")); 8231Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 3).StartsWith("-->")); 8239Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 3).StartsWith("]]>")); 8359if (chars.AsSpan(pos + 2).StartsWith("[CDATA[")) 8379if ((endPos - _ps.charPos - 2) == checkName.Length && chars.AsSpan(_ps.charPos + 2).StartsWith(checkName) && 8418if (endPos - _ps.charPos - 1 == _curNode.localName.Length && _ps.chars.AsSpan(_ps.charPos + 1).StartsWith(_curNode.localName) &&
System\Xml\Core\XmlTextReaderImplAsync.cs (11)
1179if (!_ps.chars.AsSpan(_ps.charPos).StartsWith(XmlDeclarationBeginning) || 1366if (_ps.chars.AsSpan(_ps.charPos).StartsWith("1.0")) 1517if (chars.AsSpan(pos).StartsWith("CDATA[")) 1771if (chars.AsSpan(pos).StartsWith("CDATA[")) 1966if (prefixLen == _lastPrefix.Length && chars.AsSpan(startPos).StartsWith(_lastPrefix)) 2108if (!chars.AsSpan(_ps.charPos).StartsWith(startTagNode.localName)) 2117if (!chars.AsSpan(_ps.charPos).StartsWith(startTagNode.prefix) || 2119!chars.AsSpan(colonPos + 1).StartsWith(startTagNode.localName)) 4424if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("DOCTYPE")) 4508if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("PUBLIC")) 4545if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("SYSTEM"))
System\Xml\Schema\DtdParser.cs (3)
1987if (_chars.AsSpan(_curPos + 1).StartsWith("PCDATA")) 3118if (!_chars.AsSpan(_curPos + 1).StartsWith("UBLIC")) 3137if (!_chars.AsSpan(_curPos + 1).StartsWith("YSTEM"))
System\Xml\Schema\DtdParserAsync.cs (4)
1585if (_chars.AsSpan(_curPos + 1).StartsWith("PCDATA")) 2169if (_chars.AsSpan(_curPos + 1).StartsWith("DATA")) 2531if (!_chars.AsSpan(_curPos + 1).StartsWith("UBLIC")) 2550if (!_chars.AsSpan(_curPos + 1).StartsWith("YSTEM"))
System.Text.Json (11)
System\Text\Json\Document\JsonDocument.cs (1)
368if (!otherUtf8Text.StartsWith(segment.Slice(0, idx)))
System\Text\Json\Reader\Utf8JsonReader.cs (5)
598if (other.Slice(matchedSoFar).StartsWith(span)) 623if (!other.StartsWith(localSpan.Slice(0, idx))) 658if (!other.Slice(matchedSoFar).StartsWith(span.Slice(0, idx))) 678if (!other.Slice(matchedSoFar).StartsWith(span)) 1139if (!span.StartsWith(literal))
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (4)
518if (!span.StartsWith(literal)) 558if (!literal.StartsWith(span)) 594if (span.StartsWith(leftToMatch)) 604if (!leftToMatch.StartsWith(span))
System\Text\Json\Serialization\ReadBufferState.cs (1)
170if (_buffer.AsSpan(0, _count).StartsWith(JsonConstants.Utf8Bom))
System.Windows.Forms (1)
System\Windows\Forms\Controls\ComboBox\ComboBox.AutoCompleteDropDownFinder.cs (1)
45if (length == AutoCompleteClassName.Length && buffer.StartsWith(AutoCompleteClassName))