0

I'm wondering if there's a way to use literal strings with ICU, I currently use wide character literal string like this:

u_strcpy( catColor, L"Yellow0" );

if (u_strcmp( catcolor, L"Yellow0" ) != 0)
    CatColorIsYellow();

I've heard about UNICODE_STRING but the result looks the same than with L""

Punkfloyd
  • 45
  • 4

1 Answers1

1

I'm unclear what you're asking about, but it appears you mean declaring them? In that case, see the UNICODE_STRING_SIMPLE macro:

const UnicodeString someString = UNICODE_STRING_SIMPLE("Some String");

If you're looking to declare C style Unicode string literal, take a look at the U_STRING_DECL and U_STRING_INIT macros.

See also: C++ Unicode String Literals

NuSkooler
  • 5,391
  • 1
  • 34
  • 58