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

recommendation for printing single chars #29

Open
softprops opened this issue Aug 28, 2017 · 1 comment
Open

recommendation for printing single chars #29

softprops opened this issue Aug 28, 2017 · 1 comment

Comments

@softprops
Copy link

Thanks for putting together such a nice crate. I wanted to ask for suggestion path for an usage issue I ran into. I ran into an issue where I wanted to paint a single char but was forced to allocate a new string to machine requirements with the Color#paint method. I was wondering if you had suggestions for an alternate approach.

@Lokathor
Copy link

Dunno if you ever solved your issue, but https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf8 does what you want using a buffer on the stack.

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

No branches or pull requests

2 participants