From b9ef703eb14ba2357b847b62a715b4e97f690209 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 20 Aug 2020 19:25:35 +0200 Subject: wip: grapheme shaping --- util.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index aa9fc8ba..af215111 100644 --- a/util.h +++ b/util.h @@ -35,3 +35,11 @@ sdbm_hash(const char *s) return hash; } + +#include +static inline int +my_wcswidth(const wchar_t *s, size_t n) +{ + int ret = wcswidth(s, n); + return max(0, ret); +} -- cgit v1.3