RAD Studio
ContentsIndex
PreviousUpNext
strupr, _mbsupr, _wcsupr

Header File 

string.h, mbstring.h 

Category 

Conversion Routines, Memory and String Manipulation Routines 

Prototype 

char *strupr(char *s); 

wchar_t *_wcsupr(wchar_t *s); 

unsigned char *_mbsupr(unsigned char *s); 

Description 

Converts lowercase letters in a string to uppercase. 

strupr converts lowercase letters in string s to uppercase according to the current locale's LC_CTYPE category. For the default C locale, the conversion is from lowercase letters (a to z) to uppercase letters (A to Z). No other characters are changed. 

Return Value 

strupr returns s. 

Example  

#include <stdio.h>
#include <string.h>
int main(void)
{
   char *string = "abcdefghijklmnopqrstuvwxyz", *ptr;
   /* converts string to upper case characters */
   ptr = strupr(string);
   printf("%s\n", ptr);
   return 0;
}

Portability

 
POSIX 
Win32 
ANSI C 
ANSI C++ 
strupr 
 
 
 
_mbsupr 
 
 
 
_wcsupr 
 
 
 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!