add utf32 function

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@240 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-09 10:47:36 +00:00
parent 59910e65d2
commit 2a8f0bbe28
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ extern "C" {
* %brief output Output
* %return Bytes this multibyte takes
*/
MWDECL int MwUTF8ToUTF32(const char* input, int32_t* output);
MWDECL int MwUTF8ToUTF32(const char* input, int* output);
#ifdef __cplusplus
}

View File

@@ -25,7 +25,7 @@ static int utf8_later(unsigned char c) {
return 0x80 <= c && c < 0xc0;
}
int MwUTF8ToUTF32(const char* input, int32_t* output) {
int MwUTF8ToUTF32(const char* input, int* output) {
const unsigned char* inbuf = (const unsigned char*)input;
int b = utf8_count(inbuf[0]);
if(b == 0) return 0;