summaryrefslogtreecommitdiff
path: root/src/user/knob
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-07 23:19:48 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-07 23:19:48 -0500
commit1a5ece4f52ef17c7c868e95eb26e98137d5cab6f (patch)
tree2ab5c639d368d3ec497b464009f0401e71d433f1 /src/user/knob
parent348e1876d25320e6480f2795c9388b2bc080c743 (diff)
downloadportland-os-1a5ece4f52ef17c7c868e95eb26e98137d5cab6f.tar.gz
keyboard support in raleigh, word wrap and more in entry widget
Diffstat (limited to 'src/user/knob')
-rw-r--r--src/user/knob/block.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/user/knob/block.c b/src/user/knob/block.c
index 1720f94..5b4590f 100644
--- a/src/user/knob/block.c
+++ b/src/user/knob/block.c
@@ -73,4 +73,14 @@ void str_trunc_fill(char *str, uint32_t len) {
str[j] = ' ';
str[len] = '\0';
}
+}
+
+__attribute__ ((pure))
+uint32_t str_find_any(const char *str, const char *delims) {
+ const char *i;
+ for (i = str; *i; ++i)
+ for (const char *j = delims; *j; ++j)
+ if (*i == *j)
+ return i - str;
+ return i - str;
} \ No newline at end of file