From 1a5ece4f52ef17c7c868e95eb26e98137d5cab6f Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 7 Mar 2021 23:19:48 -0500 Subject: keyboard support in raleigh, word wrap and more in entry widget --- src/user/knob/block.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/user/knob/block.c') 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 -- cgit v1.2.3