Converting uppercase to lowercase for wide characters : Wide Char Calculation « Wide Character String « C Tutorial






#include <stdio.h>

int main(void)
{
  wchar_t letter = 0;

  printf("Enter an uppercase letter:"); 
  scanf("%lc", &letter);                

  if(letter >= L'A')
    if (letter <= L'Z')
    {                  
      letter = letter - L'A'+ L'a';
      printf("You entered an uppercase %lc\n", letter);
    }
    else                           
      printf("Try using the shift key, Bud! I want a capital letter.\n");
  return 0;
}
Enter an uppercase letter:A
     You entered an uppercase a








16.9.Wide Char Calculation
16.9.1.Converting uppercase to lowercase for wide characters