diff options
| author | David Bremner <david@tethera.net> | 2019-03-25 23:07:24 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2019-05-25 06:51:12 -0300 |
| commit | 781125c9e92a2b9a2b9fbe54adec28ddb60f35b1 (patch) | |
| tree | 5625ddaa918acc0eec1b22a5d551c624fcefb311 /util/unicode-util.h | |
| parent | 46ab6013a29233b32dba49cf9c50e70fd02db1c3 (diff) | |
util: add unicode_word_utf8
This originally use Xapian::Unicode::is_wordchar, but that forces
clients to link directly to libxapian, which seems like it might be
busywork if nothing else.
Diffstat (limited to 'util/unicode-util.h')
| -rw-r--r-- | util/unicode-util.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/util/unicode-util.h b/util/unicode-util.h new file mode 100644 index 00000000..32d1e6ef --- /dev/null +++ b/util/unicode-util.h @@ -0,0 +1,12 @@ +#ifndef UNICODE_UTIL_H +#define UNICODE_UTIL_H + +#include <stdbool.h> +#include <gmodule.h> + +/* The utf8 encoded string would tokenize as a single word, according + * to xapian. */ +bool unicode_word_utf8 (const char *str); +typedef gunichar notmuch_unichar; + +#endif |
