-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add StringBuilder. appendCodePoint #11129
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
base: 2.13.x
Are you sure you want to change the base?
Conversation
* | ||
* @param n a Unicode code point. | ||
* @return this StringBuilder. | ||
*/ |
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.
add @since 2.13.17
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.
should we add codePointAt
too?
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.
should we add codePointAt too?
I haven't found that useful in my experience. Maybe delay it when the need emerges.
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.
add
@since 2.13.17
It seems we don't have such an annotation --- it's available as a parameter for @deprecated
. Or, maybe I have missed something.
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 mean add it to the Scala doc.
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.
Scala has a divergent philosophy about compatibility. Someone could do a master's thesis on how mixed projects cope.
I think the semantics of --release
would be doctoral level. Programmers need to know what API to code against, builds need to know which runtimes they support.
Add
StringBuilder.appendCodePoint
to support dealing with surrogate code points.My use case: when parsing an escaped string in a language, we advance code point by code point on the raw string to properly handle Unicode. It will be convenient to have
appendCodePoint
such that we can assemble the code points in the final string.