The Wayback Machine - https://web.archive.org/web/20150415081806/http://www.codeguru.com/cpp/cpp/string/article.php/c2795/Class-to-manipulate-UNICODE-string-on-Window-9598.htm

Class to manipulate UNICODE string on Window 95/98

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

Downloads

Download demo project - 23 Kb
Download source - 6 Kb


Comments

  • Could not understand

    Posted by Legacy on 09/13/2002 12:00am

    Originally posted by: nguyen

    Hi,
    I try to do Unicode for Vietnamese, but I could not understand how to do it. and where it begins.

    would you help me step-by-step? I have Win '98 with VC++ version 6.0

    Reply
  • Is it useful?

    Posted by Legacy on 10/05/2000 12:00am

    Originally posted by: Jerome Bonnet

    I believe that CString is already Unicode, if you use the right #define.

    Reply
  • Could not compile

    Posted by Legacy on 09/15/2000 12:00am

    Originally posted by: Keng Chiang

    Hi Mr. Kim 
    
    

    I downloaded your demo files, but could not compile.
    the errors show up on resource file (*.rc, complain about
    LANGUAGE), can you let me know as soon as possible why it failed?

    Thank you
    Keng-Ho Chiang

    Reply
  • WinNT ??

    Posted by Legacy on 04/19/2000 12:00am

    Originally posted by: Corneliu I. Tusnea

    Why doesn't it works on WinNT ?
    How can it be changed to work in NT?

    Thanks.

    Reply

Top White Papers and Webcasts

  • On-demand Event Event Date: March 19, 2015 The 2015 Enterprise Mobile Application Survey asked 250 mobility professionals what their biggest mobile challenges are, how many employees they are equipping with mobile apps, and their methods for driving value with mobility. Join Dan Woods, Editor and CTO of CITO Research, and Alan Murray, SVP of Products at Apperian, as they break down the results of this survey and discuss how enterprises are using mobile application management and private app stores to …

  • The cost and productivity benefits of moving Microsoft Office to the cloud is attractive. However, security and compliance functionality is lacking. Learn which security gaps remain and how to minimize security risks while migrating to Office365.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date