mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
fa20edc44d
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
34 lines
677 B
C
34 lines
677 B
C
#ifndef COSMOPOLITAN_LIBC_NEXGEN32E_HASCHARACTER_H_
|
|
#define COSMOPOLITAN_LIBC_NEXGEN32E_HASCHARACTER_H_
|
|
|
|
forceinline bool HasCharacter(char c, const char *s) {
|
|
unsigned i;
|
|
for (i = 0; s[i]; ++i) {
|
|
if (s[i] == c) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
forceinline bool HasCharacter16(char16_t c, const char16_t *s) {
|
|
unsigned i;
|
|
for (i = 0; s[i]; ++i) {
|
|
if (s[i] == c) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
forceinline bool HasCharacterWide(wchar_t c, const wchar_t *s) {
|
|
unsigned i;
|
|
for (i = 0; s[i]; ++i) {
|
|
if (s[i] == c) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_NEXGEN32E_HASCHARACTER_H_ */
|