1075 references to Slice
Aspire.Dashboard (8)
ConsoleLogs\AnsiParser.cs (8)
47if (IsConEmuSequence(span[currentPos..], ref currentPos) ||
48IsControlSequence(span[currentPos..], ref currentPos, out _, out _) ||
49IsLinkControlSequence(span[currentPos..], ref currentPos, out _))
86if (IsConEmuSequence(span[i..], ref i))
106if (IsLinkControlSequence(span[i..], ref i, out var url))
129if (IsControlSequence(span[i..], ref i, out var finalByte, out var parameters))
313span[currentParamStartPosition..i],
851var indexInSlice = span[startIndex..].IndexOf(value);
Aspire.Hosting.Docker (1)
GenerateDocumentationAndConfigFiles (5)
http2cat (6)
IIS.FunctionalTests (6)
IIS.LongTests (6)
IIS.NewHandler.FunctionalTests (6)
IIS.NewShim.FunctionalTests (6)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (6)
illink (1)
ILLink.RoslynAnalyzer (1)
InMemory.FunctionalTests (2)
Metrics (4)
Metrics.Legacy (4)
Microsoft.AspNetCore.Components (4)
Microsoft.AspNetCore.Components.Endpoints (9)
Microsoft.AspNetCore.Components.Forms (1)
Microsoft.AspNetCore.Components.Server (6)
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.Http.Extensions (9)
Microsoft.AspNetCore.HttpLogging (3)
Microsoft.AspNetCore.HttpOverrides (1)
Microsoft.AspNetCore.Localization (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.AspNetCore.OutputCaching (2)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (2)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.Rewrite (3)
Microsoft.AspNetCore.Routing (11)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (20)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Microsoft.AspNetCore.Shared.Tests (13)
Microsoft.AspNetCore.WebUtilities (4)
Microsoft.CodeAnalysis (7)
Microsoft.CodeAnalysis.Analyzers (4)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
Microsoft.CodeAnalysis.CodeStyle (4)
Microsoft.CodeAnalysis.CSharp (7)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.Data.Analysis (5)
Microsoft.Data.Analysis.Tests (6)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.Evaluation.NLP (3)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.OpenAI (2)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Configuration (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (14)
Microsoft.Extensions.Http.Diagnostics (3)
Microsoft.Extensions.Telemetry (11)
Microsoft.Maui.Controls.Xaml (1)
Microsoft.Maui.Essentials (2)
Microsoft.Maui.Graphics (19)
Color.cs (19)
378 red = ParseInt(colorAsHex.Slice(0, 2));
379 green = ParseInt(colorAsHex.Slice(2, 2));
380 blue = ParseInt(colorAsHex.Slice(4, 2));
381 alpha = ParseInt(colorAsHex.Slice(6, 2));
406 red = ParseInt(colorAsHex.Slice(0, 2));
407 green = ParseInt(colorAsHex.Slice(2, 2));
408 blue = ParseInt(colorAsHex.Slice(4, 2));
442 alpha = ParseInt(colorAsHex.Slice(0, 2));
443 red = ParseInt(colorAsHex.Slice(2, 2));
444 green = ParseInt(colorAsHex.Slice(4, 2));
445 blue = ParseInt(colorAsHex.Slice(6, 2));
930 value = value.Slice(op + 1, cp - op - 1);
935 quad0 = value.Slice(0, index);
941 quad1 = value.Slice(0, index);
947 quad2 = value.Slice(0, index);
972 value = value.Slice(op + 1, cp - op - 1);
977 triplet0 = value.Slice(0, index);
983 triplet1 = value.Slice(0, index);
1003 elem = elem.Slice(0, elem.Length - 1);
Microsoft.ML.Core (12)
Microsoft.ML.CpuMath (11)
CpuMathUtils.cs (9)
56TensorPrimitives.Multiply(source.Slice(0, count), value, destination);
75TensorPrimitives.MultiplyAdd(source.Slice(0, count), scale, destination.Slice(0, count), destination);
97TensorPrimitives.MultiplyAdd(source.Slice(0, count), scale, destination.Slice(0, count), result.Slice(0, count));
115TensorPrimitives.Add(source.Slice(0, count), destination.Slice(0, count), destination.Slice(0, count));
136TensorPrimitives.Multiply(left.Slice(0, count), right.Slice(0, count), destination.Slice(0, count));
194return TensorPrimitives.Dot(left.Slice(0, count), right.Slice(0, count));
Microsoft.ML.Data (8)
Microsoft.ML.PCA (2)
Microsoft.ML.Tokenizers (80)
Model\BPETokenizer.cs (10)
461EncodeWithCache(textSpanToEncode.Slice(split.Offset, split.Length), tokens, split.Offset, ref priorityQueue);
522EncodeToIdsWithCache(textSpanToEncode.Slice(split.Offset, split.Length), ids, maxTokenCount - ids.Count, out int length, ref priorityQueue);
583count += EncodeToIdsWithCache(textSpanToEncode.Slice(split.Offset, split.Length), null, maxTokenCount - count, out int length, ref priorityQueue);
663count += EncodeToIdsWithCache(textSpanToEncode.Slice(split.Offset, split.Length), null, maxTokenCount - count, out int length, ref priorityQueue);
717tokenCount += EncodeToIdsFromEndWithCache(textSpanToEncode.Slice(split.Offset, split.Length), null, maxTokenCount - tokenCount, out int textIndex, ref priorityQueue);
856span = span.Slice(0, span.Length - EndOfWordSuffix.Length);
953sSpan = sSpan.Slice(0, sSpan.Length - EndOfWordSuffix!.Length);
1032span = span.Slice(0, span.Length - EndOfWordSuffix.Length);
1202s = w.Slice(i, 2);
1207s = w.Slice(i, 1);
Model\CodeGenTokenizer.cs (6)
391EncodeInternal(null, textSpanToEncode.Slice(split.Offset, split.Length), tokens, addPrefixSpace, split.Offset, agenda);
632EncodeToIdsInternal(null, textSpanToEncode.Slice(split.Offset, split.Length), ids, agenda, out int length, maxTokenCount - ids.Count);
844count += EncodeToIdsInternal(null, textSpanToEncode.Slice(split.Offset, split.Length), null, agenda, out int length, maxTokenCount - count);
983tokenCount += EncodeToIdsFromEndInternal(null, textSpanToEncode.Slice(split.Offset, split.Length), null, agenda, out int textIndex, maxTokenCount - tokenCount);
1693if (!_mergeRanks.TryGetValue(textSpan.Slice(symbols[left].pieceSpan.Index, symbols[left].pieceSpan.Length), textSpan.Slice(symbols[right].pieceSpan.Index, symbols[right].pieceSpan.Length), out int rank))
Model\EnglishRobertaTokenizer.cs (4)
337foreach (EncodedToken t in EncodeInternal(textSpanToEncode.Slice(split.Offset, split.Length)))
441EncodeToIdsInternal(textSpanToEncode.Slice(split.Offset, split.Length), ids, out int length, maxTokenCount - ids.Count);
525count += EncodeToIdsInternal(textSpanToEncode.Slice(split.Offset, split.Length), null, out int length, maxTokenCount - count);
572tokenCount += EncodeToIdsFromEndInternal(textSpanToEncode.Slice(split.Offset, split.Length), null, out int textIndex, maxTokenCount - tokenCount);
Model\SentencePieceBpeModel.cs (28)
120EncodeInternal(text.Slice(currentOffset, Offset - currentOffset), addBeginOfSentence: false, addEndOfSentence: false, tokens);
123if (InternalSpecialTokens!.TryGetValue(text.Slice(Offset, Length), out int id))
168if (_vocab.TryGetValue(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), out (int Id, float Score, byte Type) tokenInfo))
184EncodeAsBytes(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), symbols[index].pieceSpan.Index);
262if (!_vocab.TryGetValue(text.Slice(pieceSpan.Index, pieceSpan.Length), out (int Id, float Score, byte Type) id))
264EncodeAsBytes(text.Slice(pieceSpan.Index, pieceSpan.Length), pieceSpan.Index);
272tokens.Add(new EncodedToken(id.Id, text.Slice(pieceSpan.Index, pieceSpan.Length).ToString(), new Range(pieceSpan.Index, pieceSpan.Index + pieceSpan.Length)));
379idsCount += EncodeToIds(text.Slice(currentOffset, Offset - currentOffset), addBeginOfSentence: false, addEndOfSentence: false, accumulatedIds, out charsWritten, maxTokens - idsCount);
383if (idsCount < maxTokens && InternalSpecialTokens!.TryGetValue(text.Slice(Offset, Length), out int id))
446if (_vocab.TryGetValue(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), out (int Id, float Score, byte Type) tokenInfo))
462if (!EncodeAsBytes(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), symbols[index].pieceSpan.Index, ref charsConsumed))
568if (!_vocab.TryGetValue(text.Slice(pieceSpan.Index, pieceSpan.Length), out (int Id, float Score, byte Type) id))
570return EncodeAsBytes(text.Slice(pieceSpan.Index, pieceSpan.Length), pieceSpan.Index, ref charsConsumed);
656idsCount += CountTokens(text.Slice(currentOffset, Offset - currentOffset), addBeginOfSentence: false, addEndOfSentence: false, out charsWritten, maxTokens - idsCount);
660if (idsCount < maxTokens && InternalSpecialTokens!.TryGetValue(text.Slice(Offset, Length), out int id))
714if (_vocab.TryGetValue(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), out (int Id, float Score, byte Type) tokenInfo))
730if (!EncodeAsBytes(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), symbols[index].pieceSpan.Index, ref charsConsumed))
827if (!_vocab.TryGetValue(text.Slice(pieceSpan.Index, pieceSpan.Length), out (int Id, float Score, byte Type) id))
829return EncodeAsBytes(text.Slice(pieceSpan.Index, pieceSpan.Length), pieceSpan.Index, ref charsConsumed);
930if (InternalSpecialTokens!.TryGetValue(text.Slice(current.Offset, current.Length), out int id))
939splitText = text.Slice(start, current.Offset - start);
990if (_vocab.TryGetValue(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), out (int Id, float Score, byte Type) tokenInfo))
1006if (!EncodeAsBytesFromEnd(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), symbols[index].pieceSpan.Index, ref textIndex))
1075int encodedCount = Helpers.GetUtf8Bytes(text.Slice(0, i + 1), utf8Bytes);
1103if (!_vocab.TryGetValue(text.Slice(pieceSpan.Index, pieceSpan.Length), out (int Id, float Score, byte Type) id))
1105return EncodeAsBytesFromEnd(text.Slice(pieceSpan.Index, pieceSpan.Length), pieceSpan.Index, ref textIndex);
1198if (!_vocab.TryGetValue(textSpan.Slice(symbols[left].pieceSpan.Index, pieceLength), out (int Id, float Score, byte Type) leftId))
1218=> _vocabReverse.TryGetValue(id, out string? token) ? token : text.Slice(index, length).ToString();
Model\SentencePieceUnigramModel.cs (14)
232EncodeToTokensInternal(text.Slice(currentOffset, Offset - currentOffset), considerNormalization, ref progressOffset, tokens, buffer, ref normalizedString, ref normalizedStringIndex);
235if (InternalSpecialTokens!.TryGetValue(text.Slice(Offset, Length), out int id))
240StoreNormalizedText(text.Slice(Offset, Length), ref normalizedString, ref normalizedStringIndex);
659StoreNormalizedText(text.Slice(currentOffset, Offset - currentOffset), considerNormalization, buffer, ref normalizedString, ref normalizedStringIndex);
664EncodeToIdsInternal(text.Slice(currentOffset, Offset - currentOffset), considerNormalization, ids, buffer, ref normalizedString, ref normalizedStringIndex, ref charsConsumed, maxTokenCount);
668if (InternalSpecialTokens!.TryGetValue(text.Slice(Offset, Length), out int id))
672StoreNormalizedText(text.Slice(Offset, Length), ref normalizedString, ref normalizedStringIndex);
1030StoreNormalizedText(text.Slice(currentOffset, Offset - currentOffset), considerNormalization, buffer, ref normalizedString, ref normalizedStringIndex);
1035CountTokensInternal(text.Slice(currentOffset, Offset - currentOffset), considerNormalization, ref tokenCount, buffer, ref normalizedString, ref normalizedStringIndex, ref charsConsumed, maxTokenCount);
1039if (InternalSpecialTokens!.TryGetValue(text.Slice(Offset, Length), out int id))
1043StoreNormalizedText(text.Slice(Offset, Length), ref normalizedString, ref normalizedStringIndex);
1306if (InternalSpecialTokens!.TryGetValue(text.Slice(current.Offset, current.Length), out int id))
1316StoreNormalizedTextFromEnd(text.Slice(current.Offset, current.Length), ref normalizedString, ref normalizedStringCountFromEnd);
1322GetIndexByTokenCountFromEndInternal(text.Slice(start, current.Offset - start), considerNormalization, ref tokenCount, buffer, ref normalizedString, ref normalizedStringCountFromEnd, ref charConsumedFromEnd, maxTokenCount);
Model\TiktokenTokenizer.cs (6)
282EncodeToTokens(textSpanToEncode.Slice(split.Offset, split.Length), tokens, split.Offset);
309value[i].TokenLength == 0 ? string.Empty : text.Slice(value[i].TokenIndex, value[i].TokenLength).ToString(),
350encodedTokens[i].TokenLength == 0 ? string.Empty : text.Slice(encodedTokens[i].TokenIndex, encodedTokens[i].TokenLength).ToString(),
393EncodeToIds(textSpanToEncode.Slice(split.Offset, split.Length), ids, out int length, maxTokenCount - ids.Count);
560count += CountTokens(textSpanToEncode.Slice(split.Offset, split.Length), out int length, maxTokenCount - count);
687tokenCount += CountTokensFromEnd(textSpanToEncode.Slice(split.Offset, split.Length), out int textIndex, maxTokenCount - tokenCount);
Model\WordPieceTokenizer.cs (6)
296EncodeToTokens(textSpanToEncode.Slice(split.Offset, split.Length), tokens, split.Offset);
341scoped ReadOnlySpan<char> subStr = text.Slice(start, end - start);
420EncodeToIds(textSpanToEncode.Slice(split.Offset, split.Length), ids, out int length, maxTokenCount - ids.Count);
482scoped ReadOnlySpan<char> subStr = text.Slice(start, end - start);
570count += EncodeToIds(textSpanToEncode.Slice(split.Offset, split.Length), accumulatedIds: null, out int length, maxTokenCount - count);
649int count = EncodeToIds(textSpanToEncode.Slice(split.Offset, split.Length), accumulatedIds: null, out charsConsumed, settings.MaxTokenCount - tokenCount);
Microsoft.ML.Tokenizers.Tests (1)
Microsoft.ML.Transforms (6)
Microsoft.Net.Http.Headers (2)
Microsoft.NET.StringTools (1)
PresentationBuildTasks (3)
PresentationCore (3)
PresentationFramework (33)
PresentationUI (1)
Replay (1)
Roslyn.Diagnostics.Analyzers (4)
Shared (2)
System.Collections.Immutable (13)
System.ComponentModel.Annotations (3)
System.ComponentModel.TypeConverter (9)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (8)
641 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture))),
653 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture))),
664 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture), IntFromString(textSpan[tokens[3]], culture))),
System.Diagnostics.DiagnosticSource (13)
System.Drawing.Common (2)
System.Drawing.Primitives (8)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (8)
641 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture))),
653 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture))),
664 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture), IntFromString(textSpan[tokens[3]], culture))),
System.Formats.Asn1 (110)
System.Formats.Cbor (14)
System.Formats.Nrbf (1)
System.Formats.Tar (30)
System.IO.FileSystem.Watcher (2)
System.IO.Hashing (7)
System.IO.Packaging (4)
System.IO.Pipelines (1)
System.Linq (5)
System.Memory (14)
System.Memory.Data (1)
System.Net.HttpListener (3)
System.Net.Mail (3)
System.Net.Security (1)
System.Net.ServerSentEvents (2)
System.Net.WebClient (1)
System.Net.WebHeaderCollection (1)
System.Numerics.Tensors (15)
System.Private.CoreLib (147)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Guid.cs (4)
63if (!TryParseUInt32X(text.Slice(0, 8), out uint i1, out int justConsumed) || justConsumed != 8)
70if (!TryParseUInt16X(text.Slice(8, 4), out ushort i2, out justConsumed) || justConsumed != 4)
77if (!TryParseUInt16X(text.Slice(12, 4), out ushort i3, out justConsumed) || justConsumed != 4)
84if (!TryParseUInt16X(text.Slice(16, 4), out ushort i4, out justConsumed) || justConsumed != 4)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (7)
416if (str.CompareInfo.Compare(str.Value.Slice(str.Index, target.Length), target, CompareOptions.IgnoreCase) != 0)
5581m_info.Compare(Value.Slice(Index, target.Length), target, CompareOptions.IgnoreCase) == 0;
5588if (matchLength > valueRemaining || m_info.Compare(Value.Slice(Index, matchLength), target, CompareOptions.IgnoreCase) != 0)
5620if (m_info.CompareOptionIgnoreCase(Value.Slice(thisPosition, segmentLength), target.AsSpan(targetPosition, segmentLength)) != 0)
5653if (m_info.CompareOptionIgnoreCase(Value.Slice(thisPosition, segmentLength), target.AsSpan(targetPosition, segmentLength)) != 0)
5848Value = Value.Slice(0, i + 1);
5873Value.Slice(0, i).CopyTo(result);
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.Nls.cs (7)
175if (!int.TryParse(valueSpan.Slice(0, 4), NumberStyles.None, NumberFormatInfo.InvariantInfo, out int year) ||
176!int.TryParse(valueSpan.Slice(5, 2), NumberStyles.None, NumberFormatInfo.InvariantInfo, out int month) ||
177!int.TryParse(valueSpan.Slice(8, 2), NumberStyles.None, NumberFormatInfo.InvariantInfo, out int day))
196ReadOnlySpan<char> eraName = dataSpan[names[0]];
197ReadOnlySpan<char> abbreviatedEraName = dataSpan[names[1]];
198ReadOnlySpan<char> englishEraName = dataSpan[names[2]];
199ReadOnlySpan<char> abbreviatedEnglishEraName = dataSpan[names[3]];
src\libraries\System.Private.CoreLib\src\System\Guid.cs (15)
505return TryParseExactD(guidString.Slice(1, 36), ref result);
565if (TryParseHex(guidString.Slice(0, 8), out result._a) && // _a
566TryParseHex(guidString.Slice(9, 4), out uint uintTmp)) // _b
569if (TryParseHex(guidString.Slice(14, 4), out uintTmp)) // _c
572if (TryParseHex(guidString.Slice(19, 4), out uintTmp)) // _d, _e
575if (TryParseHex(guidString.Slice(24, 4), out uintTmp)) // _f, _g
580if (Number.TryParseBinaryIntegerHexNumberStyle(guidString.Slice(28, 8), NumberStyles.AllowHexSpecifier, out uintTmp) == Number.ParsingStatus.OK) // _h, _i, _j, _k
647return TryParseExactD(guidString.Slice(1, 36), ref result);
691if (!TryParseHex(guidString.Slice(numStart, numLen), out result._a, ref overflow) || overflow)
713if (!TryParseHex(guidString.Slice(numStart, numLen), out result._b, ref overflow) || overflow)
735if (!TryParseHex(guidString.Slice(numStart, numLen), out result._c, ref overflow) || overflow)
783if (!TryParseHex(guidString.Slice(numStart, numLen), out uint byteVal, ref overflow) || overflow || byteVal > byte.MaxValue)
904charSpan.Slice(0, i).CopyTo(chArr);
955srcUtf8Span.Slice(0, i).CopyTo(destUtf8Span);
969srcUtf8Span.Slice(i, bytesConsumed).CopyTo(destUtf8Span.Slice(newLength));
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Trim.cs (9)
106return span.Slice(start, length);
123=> span.Slice(0, ClampEnd(span, 0, trimElement));
414return span.Slice(start, length);
458return span.Slice(0, ClampEnd(span, 0, trimElements));
600return span.Slice(start, end - start + 1);
637return span.Slice(0, end + 1);
665return span.Slice(start, end - start + 1);
703return span.Slice(0, end + 1);
779return span.Slice(0, end + 1);
src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (7)
42sb.Append(valueSpan.Slice(0, index));
71sb.Append(valueSpan.Slice(0, index));
171sb.Append(valueSpan.Slice(0, index));
196sb.Append(valueSpan.Slice(0, index));
227? uint.TryParse(inputSlice.Slice(2, entityLength - 2), NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture, out uint parsedValue)
228: uint.TryParse(inputSlice.Slice(1, entityLength - 1), NumberStyles.Integer, CultureInfo.InvariantCulture, out parsedValue);
251ReadOnlySpan<char> entity = inputSlice.Slice(0, entityLength);
src\libraries\System.Private.CoreLib\src\System\Version.cs (3)
390if (!TryParseComponent(input.Slice(0, majorEnd), nameof(input), throwOnFailure, out int major))
398if (!TryParseComponent(input.Slice(majorEnd + 1, minorEnd - majorEnd - 1), nameof(input), throwOnFailure, out minor))
407TryParseComponent(input.Slice(minorEnd + 1, buildEnd - minorEnd - 1), nameof(build), throwOnFailure, out build) &&
System.Private.DataContractSerialization (10)
System\Xml\XmlBufferReader.cs (8)
401BinaryPrimitives.ReadInt32LittleEndian(bytes.Slice(8, 4)),
402BinaryPrimitives.ReadInt32LittleEndian(bytes.Slice(12, 4)),
403BinaryPrimitives.ReadInt32LittleEndian(bytes.Slice(4, 4)),
404BinaryPrimitives.ReadInt32LittleEndian(bytes.Slice(0, 4))
980BinaryPrimitives.ReadInt32LittleEndian(bytes.Slice(8, 4)),
981BinaryPrimitives.ReadInt32LittleEndian(bytes.Slice(12, 4)),
982BinaryPrimitives.ReadInt32LittleEndian(bytes.Slice(4, 4)),
983BinaryPrimitives.ReadInt32LittleEndian(bytes.Slice(0, 4))
System.Private.Uri (12)
System.Private.Windows.Core (2)
System.Private.Xml (3)
System.Reflection.Emit (1)
System.Reflection.Metadata (7)
System.Resources.Extensions (2)
System.Runtime.Numerics (27)
System\Numerics\BigIntegerCalculator.DivRem.cs (8)
530left = left.Slice(0, ActualLength(left));
548Divide(left.Slice(0, quotient.Length), right[0], quotient, ref carry);
614BurnikelZieglerD3n2n(left.Slice(right.Length), left.Slice(halfN, halfN), right, quotient.Slice(halfN), r1);
615BurnikelZieglerD3n2n(r1.Slice(0, right.Length), left.Slice(0, halfN), right, quotient.Slice(0, halfN), remainder);
636ReadOnlySpan<uint> b2 = right.Slice(0, n);
655ReadOnlySpan<uint> a2 = left12.Slice(0, n);
687left = left.Slice(0, ActualLength(left));
688right = right.Slice(0, ActualLength(right));
System.Security.Cryptography.Pkcs (8)
System.Security.Cryptography.ProtectedData (1)
System.Text.Encodings.Web (5)
System.Text.Json (86)
System\Text\Json\Document\JsonDocument.cs (19)
298ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
351ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
368if (!otherUtf8Text.StartsWith(segment.Slice(0, idx)))
392return _utf8Json.Span.Slice(row.Location, row.SizeOrLength);
404ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
425ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
447ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
469ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
491ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
513ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
535ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
557ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
579ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
601ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
623ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
645ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
667ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
681ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
695ReadOnlySpan<byte> segment = data.Slice(row.Location, row.SizeOrLength);
System\Text\Json\JsonHelpers.Date.cs (6)
175|| !TryGetNextTwoDigits(source.Slice(start: 5, length: 2), ref parseData.Month)
177|| !TryGetNextTwoDigits(source.Slice(start: 8, length: 2), ref parseData.Day))
233|| !TryGetNextTwoDigits(source.Slice(start: 11, length: 2), ref parseData.Hour)
234|| !TryGetNextTwoDigits(source.Slice(start: 14, length: 2), ref parseData.Minute))
267|| !TryGetNextTwoDigits(source.Slice(start: 17, length: 2), ref parseData.Second))
358|| !TryGetNextTwoDigits(offsetData.Slice(0, 2), ref parseData.OffsetHours))
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (4)
484if (!source.Slice(0, idx).TryCopyTo(destination))
534bool result = Utf8Parser.TryParse(source.Slice(idx + 1, 4), out int scalar, out int bytesConsumed, 'x');
557result = Utf8Parser.TryParse(source.Slice(idx + 3, 4), out int lowSurrogate, out bytesConsumed, 'x');
622remaining.Slice(0, nextUnescapedSegmentLength).CopyTo(destination.Slice(written));
System\Text\Json\Reader\Utf8JsonReader.cs (15)
623if (!other.StartsWith(localSpan.Slice(0, idx)))
658if (!other.Slice(matchedSoFar).StartsWith(span.Slice(0, idx)))
746ValueSpan = _buffer.Slice(_consumed, 1);
768ValueSpan = _buffer.Slice(_consumed, 1);
780ValueSpan = _buffer.Slice(_consumed, 1);
802ValueSpan = _buffer.Slice(_consumed, 1);
966ValueSpan = _buffer.Slice(_consumed, 1);
976ValueSpan = _buffer.Slice(_consumed, 1);
1144ValueSpan = span.Slice(0, literal.Length);
1299ValueSpan = localBuffer.Slice(0, idx);
1398ValueSpan = data.Slice(0, idx);
1533ValueSpan = data.Slice(0, i);
2476(int newLines, int newLineIndex) = JsonReaderHelper.CountNewLines(localBuffer.Slice(0, idx));
2529ValueSpan = _buffer.Slice(previousConsumed + 2, idx);
2547ValueSpan = _buffer.Slice(previousConsumed + 2, idx);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (10)
341ValueSpan = _buffer.Slice(_consumed, 1);
351ValueSpan = _buffer.Slice(_consumed, 1);
529ValueSpan = span.Slice(0, literal.Length);
552span.Slice(0, amountToWrite).CopyTo(readSoFar);
562span.Slice(0, amountToWrite).CopyTo(readSoFar);
589span.Slice(0, amountToWrite).CopyTo(readSoFar.Slice(written));
609span.Slice(0, amountToWrite).CopyTo(readSoFar.Slice(written));
771ValueSpan = localBuffer.Slice(0, idx);
1100ValueSpan = data.Slice(0, idx);
1251ValueSpan = data.Slice(0, i);
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions (8)
System.Text.RegularExpressions.Generator (4)
System.Web.HttpUtility (1)
System.Windows.Forms (1)
System.Windows.Forms.Primitives (2)
System.Windows.Forms.UI.IntegrationTests (3)
System.Xaml (7)
Test.Utilities (5)
Text.Analyzers (4)