aboutsummaryrefslogtreecommitdiff
path: root/sys/libutf/find.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/find.c
parentb375f3cdedb5b0e08745d100b40e38d2f8396a58 (diff)
chore: simplified organizational structurelaptop
Diffstat (limited to 'sys/libutf/find.c')
-rw-r--r--sys/libutf/find.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/sys/libutf/find.c b/sys/libutf/find.c
deleted file mode 100644
index d75feb8..0000000
--- a/sys/libutf/find.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "internal.h"
-
-byte*
-utf8·find(byte* s, rune c)
-{
- long c1;
- rune r;
- int n;
-
- if(c < Tx)
- return strchr(s, c);
-
- for(;;){
- c1 = *(ubyte*)s;
- if(c1 < Tx){
- if(c1 == 0) return nil;
- if(c1 == c) return s;
- s++;
- continue;
- }
-
- n = utf8·decode(s, &r);
-
- if(r == c)
- return s;
-
- s += n;
- }
-
- return nil;
-}