Skip to content
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

Add lower and upper functions #1241

Closed
wants to merge 6 commits into from

Conversation

isaachier
Copy link
Contributor

No description provided.

@BarabasGitHub
Copy link
Contributor

This only works for ASCII.

@thejoshwolfe
Copy link
Sponsor Contributor

This has been discussed before (#891 #893). The tldr is that unicode manipulation functions like this are too hard to do correctly, and users should look to using ICU directly instead of the zig standard library.

Once zig is more mature and serious apps have been written in zig that handle unicode properly, we may revisit this decision. But in the meantime, i know enough about unicode to know not to attempt to support this outside of ICU.

@isaachier
Copy link
Contributor Author

Understood. Honestly, this started as simple ASCII upper/lower functions but I guess the answer is to use C's ctype or ICU for unicode?

@thejoshwolfe
Copy link
Sponsor Contributor

I haven't used ICU directly myself, but i know the solution is in there somewhere.

@isaachier isaachier deleted the lower-upper-functions branch July 15, 2018 16:03
@isaachier
Copy link
Contributor Author

isaachier commented Jul 16, 2018

I don't mean ICU specifically, just wondering if there is a need for toLower/toUpper/isLower/isUpper/eqlIgnoreCase for ASCII in Zig. I tried using @cInclude("ctype.h"); but (in hindsight obvious) got a linking error. Zig itself has no equivalent functions at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants