X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstringcodec%2Fustring.h;fp=source%2Fstringcodec%2Fustring.h;h=1a0a64eb0e83970da74fa77c11bb0977dba6c446;hb=9a79b9ca04d934e8e5b865a1d2b6719f76ec9d15;hp=0000000000000000000000000000000000000000;hpb=c5cb2162baeeb7c750595e07ba1cbfcb03702f77;p=libs%2Fcore.git diff --git a/source/stringcodec/ustring.h b/source/stringcodec/ustring.h new file mode 100644 index 0000000..1a0a64e --- /dev/null +++ b/source/stringcodec/ustring.h @@ -0,0 +1,19 @@ +#ifndef MSP_STRINGCODEC_USTRING_H_ +#define MSP_STRINGCODEC_USTRING_H_ + +#include + +namespace Msp { +namespace StringCodec { + +typedef int unichar; + +typedef std::basic_string ustring; + +inline bool is_valid_unichar(unichar ch) +{ return ch>=0 && ch<=0x10FFFF && (ch<0xD800 || ch>0xDFFF) && (ch&0xFFFE)!=0xFFFE; } + +} // namespace StringCodec +} // namespace Msp + +#endif