-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add methods from #27912 (Flow System.Text.Rune through more APIs) #117168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 29 commits
Commits
Show all changes
207 commits
Select commit
Hold shift + click to select a range
5e94820
Add rune overloads
Joy-less ddecd49
Fix some compiler errors
Joy-less bedf656
More compiler error fixes
Joy-less b67dfb9
Even more compiler error fixes
Joy-less 725d1ee
Fix more compiler errors
Joy-less b2d1828
Merge branch 'dotnet:main' into rune-overloads
Joy-less 1f6e247
Various improvements & add refs
Joy-less b1e168f
Fix validation in LastIndexOf
Joy-less 5a43a0e
Fix replace core usage
Joy-less 180825f
Merge branch 'main' into rune-overloads
jeffhandley 6c1bc2e
Fix TextInfo ToLower/ToUpper with 2-char runes
Joy-less 74fbb49
Optimize `char.Equals` for Ordinal StringComparison
Joy-less 8b30184
Add conditional compilation for SYSTEM_PRIVATE_CORLIB
Joy-less 663459d
Add more conditional compilation for SYSTEM_PRIVATE_CORLIB
Joy-less 20f24c8
Rename `r` to `value`
Joy-less d1e174b
Replace static Equals with instance methods
Joy-less 658ca88
Rename `r` to `value` in refs
Joy-less df93e85
Fix ToLower & ToUpper bypassing invariant globalization check
Joy-less f931967
Add newline between ToLower, ToUpper
Joy-less af35f71
Optimize TextWriter.Write(Rune)
Joy-less 1b9a1d3
Optimize TextWriter.WriteLine(Rune)
Joy-less beec5a0
Change TextWriter.WriteAsync(Rune)
Joy-less 2676505
Change TextWriter.WriteLineAsync(Rune)
Joy-less 23bfb48
Remove unnecessary slices in ToLower(Rune) & ToUpper(Rune)
Joy-less aaf8dd6
Revert `Split(char, options)`, `Split(char, int, options)` order
Joy-less c43c906
Flip Split(Rune, options) and Split(Rune, int, options) order
Joy-less 6b3f6c9
Make `Equals(char, StringComparison)` helper internal
Joy-less 8b3dec6
Add `StringBuilder.EnumerateRunes()` & `StringBuilder.RuneEnumerator`
Joy-less e363d74
Make `IndexOf`/`LastIndexOf` overload helpers internal
Joy-less b17d8c3
Fix WriteLineAsync(Rune)
Joy-less 283045e
Rename left/right local variables to old/new
Joy-less 94c6645
Remove unnecessary `else`
Joy-less 0485c9b
Move StringBuilder.RuneEnumerator -> StringBuilderRuneEnumerator
Joy-less ca2a687
Add `ArgumentOutOfRangeException.ThrowIfNegative(index);`
Joy-less c2d909b
Replace exception with ThrowHelper.ThrowIndexOutOfRangeException();
Joy-less 3b848a3
Add empty line between StringBuilder.Replace overloads
Joy-less 1128ecb
Add doc comments to all added APIs
Joy-less 1062fb5
Use invariant culture for string.Replace(Rune, Rune)
Joy-less c004b62
Reference `StringBuilderRuneEnumerator.cs` file
Joy-less 5fa50d6
Update exceptions in string builder GetRuneAt
Joy-less f4b207f
Change string.Replace(Rune, Rune) compare options from None to Ordinal
Joy-less 947439e
Use span comparison for StartsWith/EndsWith
Joy-less 30e6f89
Make sure start index not bypassed in string.Trim(Rune)
Joy-less 0224c91
Fix incorrect slice end index
Joy-less 1ad80df
Replace IndexOf & LastIndexOf code with span conversion
Joy-less 4bdde7f
Add `Contains_Rune` and `Contains_Rune_StringComparison` tests
Joy-less 06dddac
Add string.Split tests
Joy-less bd91a3d
Add string.IndexOf & string.LastIndexOf tests
Joy-less a28dc9b
Add string.Replace tests
Joy-less 1144b46
Fix string.Replace tests
Joy-less b377324
Add string.EndsWith tests
Joy-less 72fe4d1
Add string.StartsWith tests
Joy-less ee27bf1
Fix bounds check in TrimStart(Rune)
Joy-less bd2f971
Fix bounds check in Trim(Rune)
Joy-less 407cafb
Simplify string.Empty to Empty
Joy-less 2925584
Use AsSpan helper method to simplify rune to span
Joy-less c64b0dd
Document ordinal comparisons
Joy-less 6f47afc
Fix IndexOf/LastIndexOf startIndex
Joy-less c626e3c
Add Trim Rune tests
Joy-less 76db11d
Add StringBuilder test to EnumerateRunes test
Joy-less b276ff1
Separate EnumerateRunes tests for string & StringBuilder
Joy-less ce8ea65
Add Rune.Equals(Rune, StringComparison) test
Joy-less be12d9e
Add StringBuilder Append Rune test
Joy-less 04e655c
Add StringBuilder GetRuneAt/TryGetRuneAt tests
Joy-less 6846bcf
Add StringBuilder Insert_Rune and Insert_Rune_Invalid tests
Joy-less 730d609
Use consistent style with other tests
Joy-less e3c35e4
Add StringBuilder ReplaceRune tests
Joy-less 08381f9
Add TextWriter rune tests
Joy-less b08bb26
Add TextInfo ToLower/ToUpper tests
Joy-less 6b6fae9
Add rune tests to SplitCharSeparator
Joy-less 3584b63
Fix sub index not offsetted in IndexOf/LastIndexOf
Joy-less 4fb0122
Fix LastIndexOf searchIndex
Joy-less 816c25c
Fix LastIndexOf
Joy-less 4c61363
Remove `#if SYSTEM_PRIVATE_CORLIB`
Joy-less 6179d56
Change code style for rune trimming
Joy-less eef1a03
Fix error in new code style
Joy-less 6255a5b
Fix `Rune` not found in `TextInfoTests.cs`
Joy-less 2deb262
Fix incorrect method name in `TextWriterTests`
Joy-less 0e8585f
Fix incorrect StartsWith Rune test
Joy-less 80f0598
Fix tests with Rune attribute arguments
Joy-less 97f69b2
Fix `str` -> `value`
Joy-less dc35bbb
Fix concatenating rune array
Joy-less c935a5f
Add dedicated `SplitRuneSeparator` test
Joy-less 9354640
Fix trim rune tests
Joy-less 332a040
Fix invalid collection expressions in tests
Joy-less 819a480
Fix InsertRune test
Joy-less 7a4742f
Fix replace rune tests
Joy-less 6104e54
Fix unused comparisonType parameter
Joy-less bb1c1e9
Fix index of test names
Joy-less c5ea928
Remove redundant test
Joy-less dc48f17
Fix missing using
Joy-less 0dd15b7
Fix replace method called with string comparison argument
Joy-less bae28a1
Fix tried to test split with rune on span
Joy-less 6bbea5b
Remove start index from LastIndexOf tests
Joy-less e098468
Remove non-existent comparisonType parameter
Joy-less 5f4e8b8
Fix StartsWith test incorrect call
Joy-less f289829
Fix LastIndexOf behaviour
Joy-less 9e883b3
Various rune test fixes
Joy-less c48ff26
Fix error in LastIndexOf test
Joy-less 73df815
Some fixes and ensure the Runtime tests passes
tarekgh 59c0f39
Merge branch 'rune-overloads' of https://github.com/Joy-less/runtime …
tarekgh 01f80dc
Add brackets to ternary condition
Joy-less 71abe12
Rename `runeSeparator` to `separatorSpan`
Joy-less 00e670d
Add rune overloads
Joy-less f297561
Fix some compiler errors
Joy-less 5cd72fd
More compiler error fixes
Joy-less d6f6a49
Even more compiler error fixes
Joy-less e6b21e4
Fix more compiler errors
Joy-less 9b3b4a1
Various improvements & add refs
Joy-less fdc3103
Fix validation in LastIndexOf
Joy-less 86b36bb
Fix replace core usage
Joy-less c52087d
Fix TextInfo ToLower/ToUpper with 2-char runes
Joy-less 58f21e4
Optimize `char.Equals` for Ordinal StringComparison
Joy-less 5a67feb
Add conditional compilation for SYSTEM_PRIVATE_CORLIB
Joy-less d00aea3
Add more conditional compilation for SYSTEM_PRIVATE_CORLIB
Joy-less d776654
Rename `r` to `value`
Joy-less b00e49d
Replace static Equals with instance methods
Joy-less e39de05
Rename `r` to `value` in refs
Joy-less 73881d2
Fix ToLower & ToUpper bypassing invariant globalization check
Joy-less 449f5ed
Add newline between ToLower, ToUpper
Joy-less b55687b
Optimize TextWriter.Write(Rune)
Joy-less 94f0f34
Optimize TextWriter.WriteLine(Rune)
Joy-less 25449bc
Change TextWriter.WriteAsync(Rune)
Joy-less 86bfacb
Change TextWriter.WriteLineAsync(Rune)
Joy-less 61477db
Remove unnecessary slices in ToLower(Rune) & ToUpper(Rune)
Joy-less 3e9dd08
Revert `Split(char, options)`, `Split(char, int, options)` order
Joy-less 0fef816
Flip Split(Rune, options) and Split(Rune, int, options) order
Joy-less ba997dd
Make `Equals(char, StringComparison)` helper internal
Joy-less da4dd9d
Add `StringBuilder.EnumerateRunes()` & `StringBuilder.RuneEnumerator`
Joy-less da6eca7
Make `IndexOf`/`LastIndexOf` overload helpers internal
Joy-less f2417f6
Fix WriteLineAsync(Rune)
Joy-less a41999a
Rename left/right local variables to old/new
Joy-less 1405c65
Remove unnecessary `else`
Joy-less dd86940
Move StringBuilder.RuneEnumerator -> StringBuilderRuneEnumerator
Joy-less ccc5093
Add `ArgumentOutOfRangeException.ThrowIfNegative(index);`
Joy-less df98366
Replace exception with ThrowHelper.ThrowIndexOutOfRangeException();
Joy-less ff612f5
Add empty line between StringBuilder.Replace overloads
Joy-less 842fd1d
Add doc comments to all added APIs
Joy-less 9461ae0
Use invariant culture for string.Replace(Rune, Rune)
Joy-less f37a78f
Reference `StringBuilderRuneEnumerator.cs` file
Joy-less 4905db3
Update exceptions in string builder GetRuneAt
Joy-less 9a4c73f
Change string.Replace(Rune, Rune) compare options from None to Ordinal
Joy-less f974ebb
Use span comparison for StartsWith/EndsWith
Joy-less 38e43dc
Make sure start index not bypassed in string.Trim(Rune)
Joy-less 6eca7e4
Fix incorrect slice end index
Joy-less 233c8a5
Replace IndexOf & LastIndexOf code with span conversion
Joy-less a49f934
Add `Contains_Rune` and `Contains_Rune_StringComparison` tests
Joy-less 5369355
Add string.Split tests
Joy-less 4d25199
Add string.IndexOf & string.LastIndexOf tests
Joy-less fb304d7
Add string.Replace tests
Joy-less 69f10af
Fix string.Replace tests
Joy-less ad562b8
Add string.EndsWith tests
Joy-less c9e3ffd
Add string.StartsWith tests
Joy-less f055c19
Fix bounds check in TrimStart(Rune)
Joy-less ea406f1
Fix bounds check in Trim(Rune)
Joy-less f02a82a
Simplify string.Empty to Empty
Joy-less 7c49a43
Use AsSpan helper method to simplify rune to span
Joy-less 212d59d
Document ordinal comparisons
Joy-less 229d6f7
Fix IndexOf/LastIndexOf startIndex
Joy-less 7ffe7f6
Add Trim Rune tests
Joy-less 65ed65a
Add StringBuilder test to EnumerateRunes test
Joy-less bb59326
Separate EnumerateRunes tests for string & StringBuilder
Joy-less 84bbd87
Add Rune.Equals(Rune, StringComparison) test
Joy-less e4d2dac
Add StringBuilder Append Rune test
Joy-less 6b3d8c1
Add StringBuilder GetRuneAt/TryGetRuneAt tests
Joy-less ae3d6a3
Add StringBuilder Insert_Rune and Insert_Rune_Invalid tests
Joy-less ffe4116
Use consistent style with other tests
Joy-less 9b595bc
Add StringBuilder ReplaceRune tests
Joy-less 82ba285
Add TextWriter rune tests
Joy-less 759a921
Add TextInfo ToLower/ToUpper tests
Joy-less 416192f
Add rune tests to SplitCharSeparator
Joy-less e6afb41
Fix sub index not offsetted in IndexOf/LastIndexOf
Joy-less 9505162
Fix LastIndexOf searchIndex
Joy-less 7ea8272
Fix LastIndexOf
Joy-less a0817cc
Remove `#if SYSTEM_PRIVATE_CORLIB`
Joy-less 6de8dc0
Change code style for rune trimming
Joy-less 99306c7
Fix error in new code style
Joy-less f7e7840
Fix `Rune` not found in `TextInfoTests.cs`
Joy-less 09b0236
Fix incorrect method name in `TextWriterTests`
Joy-less dc24be3
Fix incorrect StartsWith Rune test
Joy-less c9e63de
Fix tests with Rune attribute arguments
Joy-less dff360e
Fix `str` -> `value`
Joy-less d705994
Fix concatenating rune array
Joy-less e8ab8fa
Add dedicated `SplitRuneSeparator` test
Joy-less 8b7e4cc
Fix trim rune tests
Joy-less 1fb541f
Fix invalid collection expressions in tests
Joy-less 1cd8975
Fix InsertRune test
Joy-less 238d186
Fix replace rune tests
Joy-less ec312ef
Fix unused comparisonType parameter
Joy-less 0c24087
Fix index of test names
Joy-less 0b916d0
Remove redundant test
Joy-less 9877523
Fix missing using
Joy-less c8267b8
Fix replace method called with string comparison argument
Joy-less b48a801
Fix tried to test split with rune on span
Joy-less 84bac61
Remove start index from LastIndexOf tests
Joy-less 9d34125
Remove non-existent comparisonType parameter
Joy-less 8f21b60
Fix StartsWith test incorrect call
Joy-less 660a85a
Fix LastIndexOf behaviour
Joy-less 50e2cc3
Various rune test fixes
Joy-less c5b4880
Some fixes and ensure the Runtime tests passes
tarekgh 3b6d320
Add brackets to ternary condition
Joy-less 83791c3
Rename `runeSeparator` to `separatorSpan`
Joy-less 1851052
Final fixes touches.
tarekgh de1e84d
Merge branch 'rune-overloads' of https://github.com/Joy-less/runtime …
tarekgh 5df6484
Merge branch 'main' into rune-overloads
tarekgh c7dc92b
Merge branch 'main' of https://github.com/dotnet/runtime into rune-ov…
tarekgh 859d0a5
Merge branch 'rune-overloads' of https://github.com/Joy-less/runtime …
tarekgh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.