Created
September 28, 2016 15:10
-
-
Save philippkeller/3f5f14a754723ceb18a0ee15eb801d8f to your computer and use it in GitHub Desktop.
converts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn array_to_string(slice:&[i8]) -> String { | |
slice.iter().take_while(|&x| *x != 0).map(|&a| a as u8 as char).join("") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment