summaryrefslogtreecommitdiffhomepage
path: root/include/stc
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-08-17 04:37:22 +0200
committerTyge Lovset <[email protected]>2023-08-17 04:37:22 +0200
commit2ba238e66efec7b6d895425c4f1160b3b72d242b (patch)
treed7c4a8946b92a9eea8aee296e0a58f71a292816b /include/stc
parent3da201d122a47f7bf6381b23702815474d64c471 (diff)
downloadSTC-modified-2ba238e66efec7b6d895425c4f1160b3b72d242b.tar.gz
STC-modified-2ba238e66efec7b6d895425c4f1160b3b72d242b.zip
Small refactoring.
Diffstat (limited to 'include/stc')
-rw-r--r--include/stc/crawstr.h9
-rw-r--r--include/stc/cspan.h2
2 files changed, 1 insertions, 10 deletions
diff --git a/include/stc/crawstr.h b/include/stc/crawstr.h
index 7cf62e94..3b836222 100644
--- a/include/stc/crawstr.h
+++ b/include/stc/crawstr.h
@@ -83,19 +83,10 @@ STC_INLINE crawstr_iter crawstr_advance(crawstr_iter it, intptr_t pos) {
return it;
}
-/* utf8 size */
-STC_INLINE intptr_t crawstr_u8_size(crawstr rs)
- { return utf8_size_n(rs.str, rs.size); }
-
-/* utf8 validation: depends on src/utf8code.c */
-STC_INLINE bool crawstr_valid_utf8(crawstr rs)
- { return utf8_valid_n(rs.str, rs.size); }
-
/* utf8 ignore case cmp: depends on src/utf8code.c */
STC_INLINE int crawstr_icmp(const crawstr* x, const crawstr* y)
{ return utf8_icmp_sv(c_sv_2(x->str, x->size), c_sv_2(y->str, y->size)); }
-
STC_INLINE int crawstr_cmp(const crawstr* x, const crawstr* y) {
intptr_t n = x->size < y->size ? x->size : y->size;
int c = c_memcmp(x->str, y->str, n);
diff --git a/include/stc/cspan.h b/include/stc/cspan.h
index 1b57d4d4..f806ed8f 100644
--- a/include/stc/cspan.h
+++ b/include/stc/cspan.h
@@ -24,7 +24,7 @@
/*
#include <stdio.h>
#include <stc/cspan.h>
-#include <stc/algo/filter.h>
+#include <stc/algorithm.h>
using_cspan(Span2f, float, 2);
using_cspan(Intspan, int);