diff options
author | pommicket <pommicket@gmail.com> | 2023-01-24 20:56:43 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-24 20:56:43 -0500 |
commit | 71dc7b8671449f936a2875e6f8a9649131234fc4 (patch) | |
tree | 76a45a615070948c79ad7205e786517858c321d2 /src | |
parent | cbdb80698fd7128e7bcc63c8513e53731dda0963 (diff) |
remove whitespace from *inside* scene string
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 1 | ||||
-rw-r--r-- | src/sdf.rs | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 8f8859b..b8f8329 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,6 @@ /* @TODO: - reload settings.txt when changed -- strip ' ' and '\n' from *inside* string - flash error on bad string (see @TODO(error handling)) - RnToRn functions (& add back in RToR) - also add PerComponent(Box<RToR>,Box<RToR>,Box<RToR>) in R3ToR3 @@ -67,7 +67,7 @@ fn encode_hex(data: &[u8]) -> String { /// decode `data` from hexadecimal. /// returns None if this isn't a valid hexadecimal string. fn decode_hex(data: &str) -> Option<Vec<u8>> { - let data = data.trim(); + let data = data.replace(char::is_whitespace, ""); if data.len() % 2 != 0 { return None; } |