This CUniString is modeled on CString to manipulate UNICODE string. It
is very convenient to manipulate UNICODE string. If you want to do something with UNICODE
string on Window 95/98(not Window NT), it can help you. Just add “UniString.h” and “UniString.cpp”
to your project.
| Examples: | |
| CString sCString; | // CString variable |
| CUniString sUniString; | // CUniString variable |
| sUniString("Test String"); | // Initialize with string |
| sUniString(sCString); | // Initialize with CString |
| sUniString = sCString; | // CString to CUnistring |
| sCString = sUniString; | // CUniString to CString |
| sUniString.Mid(5); | // Mid, Left, Right methods |
| sUniString.Mid(5,2); | |
| sUniString.Left(5); | |
| sUniString.Right(5); | |
| Comparison functions: | |
| [ ] | Indexing with bounds check |
| ==, !=, <, <=, >, >= | Usual relational and equality |
| Other functions: | |
| <<, >> | Serialization |
| unsigned int GetLength( ) | Return strlen equivalent |
| GetBuffer() | Get buffer pointer |
| Empty() | Empty the buffer |