aboutsummaryrefslogtreecommitdiff
path: root/sys/libunicode/findlast.c
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 /sys/libunicode/findlast.c
parent0a1041044141ddbda0c67602e70fe8894e7430fd (diff)
chore: libunicode -> libutf
Diffstat (limited to 'sys/libunicode/findlast.c')
-rw-r--r--sys/libunicode/findlast.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/sys/libunicode/findlast.c b/sys/libunicode/findlast.c
deleted file mode 100644
index ab25ab2..0000000
--- a/sys/libunicode/findlast.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "internal.h"
-
-byte*
-utf8·findlast(byte* s, rune c)
-{
- long c1;
- rune r;
- byte *l;
-
- if(c < Tx)
- return strrchr(s, c);
-
- l = nil;
- for(;;){
- c1 = *(ubyte*)s;
- if(c1 < Tx){
- if(c1 == 0) return l;
- if(c1 == c) l = s;
- s++;
- continue;
- }
-
- c1 = utf8·decode(s, &r);
-
- if(r == c)
- l = s;
-
- s += c1;
- }
-
- return nil;
-}