how i can convert PWSTR variable to uppercase in vc++. I googled but didn’t get the code sample.
EDITED
What i want to do with PWSTR variable is, a method’s return type is PWSTR. I have to check whether the returned value is equal to string "Y". so whatever comes from return I am trying to UPPER its case then checking.
One more thing I want to know, how to use PWSTR var in if() condition checking.
thanks
There is
_tcsupr_sand friends which should get you in the right direction.EDIT:
Following on from your edit, you don’t need to worry about converting to upper case for you to then do the comparison — you can instead call the case insensitive string comparison function,
_tcsicmp(or its friends if you’re not compiling for Unicode) – there is example code if you follow the link, which also explains the importance of having set the correct locale to give the results you’re expecting.