aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 67db1b9..c3d2f1a 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -162,3 +162,11 @@ pub enum ControlToken {
Eof,
Continue,
}
+
+macro_rules! ctostr {
+ ($c:expr) => {
+ &*$c.encode_utf8(&mut [0; 4])
+ };
+}
+
+pub(crate) use ctostr;