0

Im trying to check if a wchar_t * equals case-insensitive to another wchar_t *. Can someone put me in the right way?

There is what I tryed:

wchar_t *vectored[80] = { ... };
int i = 0;
int j = 1;
_Towlower(vectored[i], NULL) == _Towlower(vectored[j], NULL);

_Tolower() no overload for wchar_t pointer.

Thanks you.

Marcos Eusebi
  • 617
  • 7
  • 17

2 Answers2

4

Are you sure you're not using _towlower (lowercase t)? If so, _towlower converts a single character, not a complete string. To compare a complete string, use _wcsicmp.

user1610015
  • 6,561
  • 2
  • 15
  • 18
0

You could use the wcscasecmp function if it's available in your implementation.

Daniel Martín
  • 7,815
  • 1
  • 29
  • 34