aboutsummaryrefslogtreecommitdiff
path: root/include/libunicode.h
diff options
context:
space:
mode:
authorNicholas <nbnoll@eml.cc>2021-11-10 20:12:45 -0800
committerNicholas <nbnoll@eml.cc>2021-11-10 20:12:45 -0800
commitb5de2d7bd1e08d27f7780434e601d6d3a0750583 (patch)
tree1d12af8a2c5903f1eef3b967e52474a244e78257 /include/libunicode.h
parent0a1041044141ddbda0c67602e70fe8894e7430fd (diff)
chore: libunicode -> libutf
Diffstat (limited to 'include/libunicode.h')
-rw-r--r--include/libunicode.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/include/libunicode.h b/include/libunicode.h
deleted file mode 100644
index d6618eb..0000000
--- a/include/libunicode.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#pragma once
-
-typedef uint32 rune;
-
-#define UTFmax 4
-#define RuneErr 0xFFFDu
-#define RuneMax 0x10FFFFu
-
-#define utf8·onebyte(c) (((c)&0x80u)==0x00u)
-#define utf8·twobyte(c) (((c)&0xE0u)==0xC0u)
-#define utf8·threebyte(c) (((c)&0xF0u)==0xE0u)
-#define utf8·fourbyte(c) (((c)&0xF8u)==0xF0u)
-
-/*
- * UTF-8 functions.
- */
-int utf8·len(char *s); // returns number of runes for s
-int utf8·runelen(rune r); // returns number of bytes for rune
-int utf8·runewidth(rune r); // returns number of printed columns for rune
-
-int utf8·decode(char *, rune *); // decode 1 rune from char stream, store into rune, return number of bytes
-int utf8·encode(rune *, char *); // encode 1 rune from rune stream, store into char, return number of bytes
-int utf8·decodeprev(char *s, rune *r); // decode 1 rune from char stream, reading backwards, store into rune, return number of bytes
-
-char *utf8·find(char *s, rune); // find rune in char stream
-char *utf8·findlast(char* s, rune); // find last rune in char stream
-
-int utf8·canfit(char *, int); // XXX: odd function...
-
-int utf8·isletter(rune r);
-int utf8·isdigit(rune r);
-int utf8·isspace(rune r);
-int utf8·istitle(rune r);
-int utf8·ispunct(rune r);
-
-rune utf8·toupper(rune r);
-rune utf8·tolower(rune r);
-rune utf8·totitle(rune r);