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

Blank? second attempt #3227

Closed
wants to merge 3 commits into from
Closed

Blank? second attempt #3227

wants to merge 3 commits into from

Conversation

kostya
Copy link
Contributor

@kostya kostya commented Sep 1, 2016

i so many times need this function, and just put in code everytime: https://github.com/kostya/myhtml/blob/master/examples/texts.cr#L28

maybe change name to unicode_whitespaced?

Verified

This commit was signed with the committer’s verified signature.
headius Charles Oliver Nutter
@oprypin
Copy link
Member

oprypin commented Sep 1, 2016

This pull request breaks a convention: every other method on Char (like alpha? and upcase) deals only with ASCII text.

Crystal needs extensive support for Unicode and its categories, but the language creators have expressed the wish to keep that in a Unicode module.

@asterite
Copy link
Member

asterite commented Sep 1, 2016

Note that I'm not against generally supporting Unicode in String and Char, it's just that I think it's super hard to do right now, so I consider it low priority (for myself, if anyone wants to implement it please go ahead)

@bcardiff
Copy link
Member

bcardiff commented Sep 2, 2016

#blank? Should be aligned with #whitespace?. I kind of prefer defaulting to unicode operations. Even on case related functions. I think we should settle down what we want before making only some methods unicode friendly.

@ozra
Copy link
Contributor

ozra commented Sep 2, 2016

Unicode sounds good as standard for everything on Char. Perhaps there would be room for an AsciiChar (or ASCIIChar according to idiomatic naming?) for when needing max-juice to process text-records and transactions specified to being ASCII. Or not.

@kostya
Copy link
Contributor Author

kostya commented Sep 14, 2016

extract to here https://github.com/kostya/blank, because use in some projects.

@kostya kostya closed this Sep 14, 2016
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

5 participants