a1783a9c34
The current `String.fromCharCodes` behavior, throwing if `start` or `end` is larger than the length of the `charCodes` iterable, is inconsistent with the argument being an `Iterable<int>`, which the user is not expected to know the length of. Most other operations that accepts or produces an `Iterable` and restricts it to a range, will allow the range to exceed the length of the iterable, acting like `.take(end).skip(start)`, just without needing to create wrappers that hide the original value. (`List.setRange` is another exception, and should probably be fixed by allowing the range to be partially filled, since it's too hard to change it to require a `List` argument.) Fixes #50253, #53937 Tested: Added to `corelib/string_fromcharcodes_test.dart` Bug: https://dartbug.com/53937, https://dartbug.com/50253, https://dartbug.com/23282 Change-Id: Ie19c5fa8e715ea1c58c9c77c247f2a563654c1aa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333921 Commit-Queue: Lasse Nielsen <lrn@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Reviewed-by: Stephen Adams <sra@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Ömer Ağacan <omersa@google.com>