summaryrefslogtreecommitdiff
path: root/src/shared/utf8.h
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-08-14 18:12:43 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-08-14 18:12:43 -0400
commit03070edd5c0f6ae55ed79b9fc1295af39844ff40 (patch)
tree047bc4cd7ebdb01cc4d6aa0bfb111ec5ce73f313 /src/shared/utf8.h
parent28744043fbaca39dfc9fd1666a8557fd6d8a690f (diff)
src/shared: import more code cleanups from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/utf8.h')
-rw-r--r--src/shared/utf8.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shared/utf8.h b/src/shared/utf8.h
index 9d09153c1c..24232247f5 100644
--- a/src/shared/utf8.h
+++ b/src/shared/utf8.h
@@ -17,13 +17,18 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#include <stdbool.h>
#include "macro.h"
char *ascii_is_valid(const char *s) _pure_;
-bool utf8_is_printable(const char* str, size_t length) _pure_;
+bool utf8_is_printable_newline(const char* str, size_t length, bool newline) _pure_;
+_pure_ static inline bool utf8_is_printable(const char* str, size_t length) {
+ return utf8_is_printable_newline(str, length, true);
+}
char *utf16_to_utf8(const void *s, size_t length);