The rupshift() function
The rupshift() function changes all the characters within a null-terminated string to uppercase characters.
Syntax
void rupshift(s)
char *s;
- s
- A pointer to a null-terminated string.
Usage
The rupshift() function refers to the current locale to determine uppercase and lowercase letters. For the default locale, US English, rupshift() uses the ASCII lowercase (a-z) and uppercase (A-Z) letters.
If you use a nondefault locale, rupshift() uses the lowercase and uppercase letters that the locale defines. For more information, see the HCL Informix GLS User's Guide.
Example
This sample program is in the rupshift.ec file
in the demo directory.
/*
* rupshift.ec *
The following program displays the result of rupshift() on a string
of numbers, letters and punctuation.
*/
#include <stdio.h>
main()
{
static char string[] = "123abcdefghijkl;.";
printf("RUPSHIFT Sample ESQL Program running.\n\n");
printf("\tInput string: %s\n", string);
rupshift(string);
printf("\tAfter upshift: %s\n", string); /* Result */
printf("\nRUPSHIFT Sample Program over.\n\n");
}
Output
RUPSHIFT Sample ESQL Program running.
Input string: 123abcdefghijkl;.
After upshift: 123ABCDEFGHIJKL;.
RUPSHIFT Sample Program over.