-
Notifications
You must be signed in to change notification settings - Fork 15
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
unix.rs: Added POSIX modifiers support for BCP 47 conversion #33
Conversation
fde48fd
to
43e7b36
Compare
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.
Thank you for the PR. I think this is going in the right direction so far.
TIL about the @
separator as well 😄
43e7b36
to
66c92fd
Compare
b20dd72
to
bfc66e4
Compare
1. Renamed function `parse_locale_code` to `posix_to_bcp47`. 2. Changed return type from `Option<String>` to `String`. 3. Changed locale cropping to trim at the first occurrence of either dot (`.`) or at sign (`@`), removing any modifiers. 4. Added tests for modifier cropping. 5. Added doc comment for `posix_to_bcp47`.
bfc66e4
to
3e33169
Compare
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.
Thank you again, this looks good now.
Released in 0.3.2. Thanks again! |
Partially resolves #32.
parse_locale_code
toposix_to_bcp47
.Option<String>
toString
..
) or at sign (@
), removing any modifiers.posix_to_bcp47
.