diff options
-rw-r--r-- | src/u_utils.c | 17 | ||||
-rw-r--r-- | src/u_utils.h | 3 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/u_utils.c b/src/u_utils.c index 65b59a3..cc2f893 100644 --- a/src/u_utils.c +++ b/src/u_utils.c @@ -215,3 +215,20 @@ u_decrease_subpath(char subp[]) *p = 0x00; } } + +bool_t +u_ischarset +(wchar_t c, + const wchar_t cs[]) +{ + wchar_t *p; + + p = (wchar_t*)cs; + while (*p != 0x00 && *p != c) { + p++; + } + if (*p != 0x00) { + return (TRUE); + } + return (FALSE); +} diff --git a/src/u_utils.h b/src/u_utils.h index f1e0571..499b15a 100644 --- a/src/u_utils.h +++ b/src/u_utils.h @@ -43,6 +43,8 @@ * 2020-11-05 19:28 */ +#include <stddef.h> + #include "c_unixize.h" void u_memdel(void**); @@ -52,3 +54,4 @@ void u_del_nargv(char** nargv); char** u_get_nargv(struct opts_s*); void u_increase_subpath(char[], const char[]); void u_decrease_subpath(char[]); +bool_t u_ischarset(wchar_t, const wchar_t[]); |