mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-15 05:43:29 +00:00
renders
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@242 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -74,3 +74,23 @@ int MwUTF8Length(const char* input) {
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
int MwUTF8Copy(const char* src, int srcskip, char* dst, int dstskip, int len){
|
||||
int i;
|
||||
int out;
|
||||
int total = 0;
|
||||
for(i = 0; i < srcskip; i++) src += MwUTF8ToUTF32(src, &out);
|
||||
for(i = 0; i < dstskip; i++) dst += MwUTF8ToUTF32(dst, &out);
|
||||
for(i = 0; i < len; i++){
|
||||
int len = MwUTF8ToUTF32(src, &out);
|
||||
|
||||
memcpy(dst, src, len);
|
||||
|
||||
src += len;
|
||||
dst += len;
|
||||
total += len;
|
||||
}
|
||||
dst[total] = 0;
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user