i need function returns unicode value of character.
in java string.valueof('а'); valid.
is there equivalent function in c++?
the question doesn't make sense in context of c++. have define mean unicode value (which encoding format)—java insists on utf-16, arguably utf-8 or utf-32 make more sense.
also, despite name, java function not change or reinterpret values. it's exact equivalent of wstring( 1, l'a' )
in c++, @ least on machines wchar_t
utf-16. (in c++11, can force utf-16, std::u16string( 1, u'a' )
.)
Comments
Post a Comment