aboutsummaryrefslogtreecommitdiff
path: root/sys/libutf/findlast.c
diff options
context:
space:
mode:
authorNicholas <nbnoll@eml.cc>2021-11-12 09:22:01 -0800
committerNicholas <nbnoll@eml.cc>2021-11-12 09:22:01 -0800
commitce05175372a9ddca1a225db0765ace1127a39293 (patch)
tree5988b4d4f6b402e4953945886fc90aae11203df6 /sys/libutf/findlast.c
parentb375f3cdedb5b0e08745d100b40e38d2f8396a58 (diff)
chore: simplified organizational structurelaptop
Diffstat (limited to 'sys/libutf/findlast.c')
-rw-r--r--sys/libutf/findlast.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/sys/libutf/findlast.c b/sys/libutf/findlast.c
deleted file mode 100644
index ab25ab2..0000000
--- a/sys/libutf/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;
-}