Add EnumerateRunes() ref APIs and unit tests#33504
Add EnumerateRunes() ref APIs and unit tests#33504GrabYourPitchforks merged 4 commits intodotnet:masterfrom
Conversation
| public System.String TrimStart() { throw null; } | ||
| public System.String TrimStart(char trimChar) { throw null; } | ||
| public System.String TrimStart(params char[] trimChars) { throw null; } | ||
| public partial struct RuneEnumerator : System.Collections.Generic.IEnumerable<System.Text.Rune>, System.Collections.Generic.IEnumerator<System.Text.Rune> |
There was a problem hiding this comment.
public partial struct RuneEnumerator [](start = 8, length = 36)
Talked offline with Levi if this can be moved outside String class. I am no ta fan of nested types but I will be ok if decided to keep it inside.
There was a problem hiding this comment.
The next logical place would be System.Text.StringRuneEnumerator. Since very few people will ever use this type directly (most should access it via a foreach, which hides the type name) I'm fine with moving it out in order to keep the string class cleaner.
| } | ||
| Assert.Equal(expected, enumeratedValues.ToArray()); | ||
|
|
||
|
|
|
It turns out we may have to move the nested class out to a standalone non-nested class anyway. |
72d8d5f to
e6f79d8
Compare
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
|
It's a struct. That makes a copy. |
|
@stephentoub
As far as I can see, here are only three public types in corefx that utilize |
Reference assembly APIs and unit tests for dotnet/coreclr#21007.
This PR will not pass CI until the coreclr PR is committed and the build system injects the new drop into corefx.