cutes/strutil.h

18 lines
618 B
C
Raw Normal View History

#ifndef CUTES_STRUTIL_H
#define CUTES_STRUTIL_H
2024-01-25 13:08:23 +00:00
#include "stdlib.h"
#include "stdint.h"
typedef int(*CharPredFn)(int);
extern uintptr_t strnhash(const char* s, size_t n);
extern uintptr_t strhash(const char* s);
extern long strlast(const char* rbegin, const char* rend, char search);
extern long strfirst(const char* begin, const char* end, char search);
extern long strcount(const char* begin, const char* end, char search);
extern long strfirst_pred(const char* begin, const char* end, CharPredFn pred);
extern long strlast_pred(const char* rbegin, const char* rend, CharPredFn pred);
#endif // !CUTES_STRUTIL_H