Extracts string from byte array, removing \0 symbols
(bytes: &[u8])
| 42 | |
| 43 | /// Extracts string from byte array, removing \0 symbols |
| 44 | pub fn extract_str(bytes: &[u8]) -> Result<String, Utf8Error> { |
| 45 | Ok(from_utf8(bytes)?.replace('\0', "").to_string()) |
| 46 | } |
| 47 | |
| 48 | /// Flips key index horizontally, for use with Original v1 Stream Deck |
| 49 | pub fn flip_key_index(kind: &Kind, key: u8) -> u8 { |
no outgoing calls
no test coverage detected