Repository navigation
Underlying CoreCLR support for new string slicing overloads - #15811
2 commits merged into
Conversation
https://github.com/dotnet/corefx/issues/25254 These add the underlying support for the fast versions of these extension methods.
|
This PR is part of https://github.com/dotnet/corefx/issues/24072, not 25254. |
|
|
||
| /// <summary>Creates a new <see cref="ReadOnlyMemory{T}"/> over the portion of the target string.</summary> | ||
| /// <param name="text">The target string.</param> | ||
| /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="text"/> is a null reference (Nothing in Visual Basic).</exception> |
There was a problem hiding this comment.
Is it necessary to specify "Nothing in Visual Basic". If so, should we add that to other comments as well (for example: https://github.com/dotnet/corefx/blob/master/src/System.Memory/src/System/MemoryExtensions.Portable.cs#L63). Is there a way to indicate that Nothing is a keyword?
There was a problem hiding this comment.
The phrase appears in various XML docs (probably all copy-pasted from one instance as these were.) I don't really have a dog in this either way - I'd rather that this PR not be used as the place to debate that issue, though.
| /// <param name="text">The target string.</param> | ||
| /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="text"/> is a null reference (Nothing in Visual Basic).</exception> | ||
| /// <exception cref="System.ArgumentOutOfRangeException"> | ||
| /// Thrown when the specified <paramref name="start"/> index is not in range (<0 or >=text.Length). |
There was a problem hiding this comment.
Comment vs code mismatch. index is not in range (<0 or >=text.Length)
The code throws if start > text.Length
Here and elsewhere.
| return new ReadOnlyMemory<char>(text, start, text.Length - start); | ||
| } | ||
|
|
||
| /// <summary>Creates a new <see cref="ReadOnlyMemory{T}"/> over the portion of the target string.</summary> |
There was a problem hiding this comment.
We create a ReadOnlyMemory<char> not ReadOnlyMemory{T}.
Here and elsewhere.
https://github.com/dotnet/corefx/issues/24072 These add the underlying support for the fast versions of these extension methods.
https://github.com/dotnet/corefx/issues/25254
These add the underlying support for the fast versions of
these extension methods.