blob: 9a2cf036cb26b58d1949a87bb7d61dc15dd6ac2f (
plain) (
tree)
|
|
#include "rune.h"
#include "utf8.h"
#include "internal/common.h"
const char8_t *
u8chk(const char8_t *s, size_t n)
{
while (n) {
rune ch;
int m = u8tor(&ch, s);
if (ch == RUNE_ERROR)
return s;
n += m;
}
return nullptr;
}
|