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 string lower and string upper #4080

Closed
krader1961 opened this issue May 30, 2017 · 5 comments
Closed

add string lower and string upper #4080

krader1961 opened this issue May 30, 2017 · 5 comments
Assignees
Milestone

Comments

@krader1961
Copy link
Contributor

I was working on a proof of concept implementation to support zsh style tied variables to address issue #436. But I found myself needing a way to lowercase a string. Now that we have a string builtin it shouldn't be necessary to run an external command like tr to do this operation.

@krader1961 krader1961 added this to the fish 2.7.0 milestone May 30, 2017
@krader1961 krader1961 self-assigned this May 30, 2017
@faho
Copy link
Member

faho commented Jun 11, 2017

This doesn't do full unicode locale-aware uppercasing:

$ string toupper "aßb"
AßB

(which should be "ASSB" if the locale is de_DE.UTF-8)

This is okay (this functionality is unlikely to be used and brings with it a bunch of issues), but should probably be documented.

@zanchey
Copy link
Member

zanchey commented Jun 11, 2017

See also #2241.

@krader1961
Copy link
Contributor Author

This doesn't do full unicode locale-aware uppercasing.

Correct. But that's true of all the non-ASCII handling within fish. The only feasible way to fix it is to use the ICU or Boost libraries.

@zanchey
Copy link
Member

zanchey commented Jun 11, 2017

git revert 0d64bbed46f07f78a24449139d11e7fafe968e4e? 😂

@floam
Copy link
Member

floam commented Jul 26, 2017

Am I crazy or should it be possible with the STL in C++?

https://stackoverflow.com/a/17993266

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants