summaryrefslogtreecommitdiffstats
path: root/src/basic/bus-label.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/bus-label.h')
-rw-r--r--src/basic/bus-label.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/basic/bus-label.h b/src/basic/bus-label.h
new file mode 100644
index 0000000..664cfaf
--- /dev/null
+++ b/src/basic/bus-label.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "string-util.h"
+
+char *bus_label_escape(const char *s);
+char *bus_label_unescape_n(const char *f, size_t l);
+
+static inline char *bus_label_unescape(const char *f) {
+ return bus_label_unescape_n(f, strlen_ptr(f));
+}