- Notifications
You must be signed in to change notification settings - Fork396
Complete methods of Character about code points in char sequences.#5034
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
if (index == limit - 1) | ||
a(index).toInt // the only case where `limit` makes a difference | ||
else | ||
codePointAtImpl(CharSequence.ofArray(a), index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Wouldn't callingcodePointAt(a, index)
be pretty much equally fast, but less code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ah yes, that's a good observation.
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/lang/StringTest.scala OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/lang/StringTest.scala OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I won't have a computer until Monday evening, so I'll update then.
Uh oh!
There was an error while loading.Please reload this page.
if (index == limit - 1) | ||
a(index).toInt // the only case where `limit` makes a difference | ||
else | ||
codePointAtImpl(CharSequence.ofArray(a), index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ah yes, that's a good observation.
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/lang/StringTest.scala OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Implement all overloads of `java.lang.Character.`:* `codePointAt`* `codePointBefore`* `codePointCount`* `offsetByCodePoints`In the process, unify with the implementations of methods of thesame name in `jl.String`.This completes the set of methods of `jl.Character` that do notneed the Unicode database.Fixesscala-js#5010, among other things.
1176359
toe10803c
Compare1ff5f96
intoscala-js:mainUh oh!
There was an error while loading.Please reload this page.
Implement all overloads of
java.lang.Character.
:codePointAt
codePointBefore
codePointCount
offsetByCodePoints
In the process, unify with the implementations of methods of the same name in
jl.String
.This completes the set of methods of
jl.Character
that do not need the Unicode database.Fixes#5010, among other things.