2024-01-26 21:58:02 +00:00
|
|
|
#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);
|
|
|
|
|
2024-01-26 21:58:02 +00:00
|
|
|
#endif // !CUTES_STRUTIL_H
|