version 1.2, 2003/08/20 19:21:07
|
version 1.3, 2003/08/21 21:50:38
|
|
|
| |
#include "CommonUTF.h" | #include "CommonUTF.h" |
#include <cstring> | #include <cstring> |
|
|
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
|
// Note: Caller must ensure that "src" contains "size" bytes. |
int isValid_U8(const Uint8 *src, int size) | int isValid_U8(const Uint8 *src, int size) |
{ | { |
if((strlen((const char*)src)+1) < size) |
|
{ |
|
return false; |
|
} |
|
Uint8 U8_char; | Uint8 U8_char; |
const Uint8 *srcptr = src+size; | const Uint8 *srcptr = src+size; |
switch (size) | switch (size) |