Add new string natives/stocks, make some UTF-8 safe (bug 6110, r=ds)

This commit is contained in:
Arkshine
2014-04-30 09:33:03 +02:00
parent c99a518ba4
commit a86ca1491f
12 changed files with 1560 additions and 161 deletions

View File

@@ -163,6 +163,13 @@ public:
*out='\0';
}
/* Don't truncate a multi-byte character */
if (*(output - 1) & 1 << 7)
{
size = UTIL_CheckValidChar(output - 1);
*(output - size) = '\0';
}
return 1;
}
// Returns 1 on success