chiark / gitweb /
util: add strreplace() to replace a substring by another string
[elogind.git] / src / shared / util.h
index b979b0e89fe9c0208955aa3cfc24f323d6f9935d..a148ebbc5887b4790ab343a60a6d08f82408dab7 100644 (file)
@@ -90,6 +90,8 @@ union dirent_storage {
 #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m"
 #define ANSI_HIGHLIGHT_OFF "\x1B[0m"
 
+bool is_efiboot(void);
+
 usec_t now(clockid_t clock);
 
 dual_timestamp* dual_timestamp_get(dual_timestamp *ts);
@@ -600,3 +602,14 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
                  void *arg);
 
 bool is_locale_utf8(void);
+
+typedef enum DrawSpecialChar {
+        DRAW_TREE_VERT,
+        DRAW_TREE_BRANCH,
+        DRAW_TREE_RIGHT,
+        DRAW_TRIANGULAR_BULLET,
+        _DRAW_SPECIAL_CHAR_MAX
+} DrawSpecialChar;
+const char *draw_special_char(DrawSpecialChar ch);
+
+char *strreplace(const char *text, const char *old_string, const char *new_string);