#include <lcstring.h> void *memupr(void *memblk, size_t n);
memupr
scans the first n
bytes of the input memory block
addressed by memblk
, converting lowercase characters ('a' to 'z') to
uppercase characters ('A' to 'Z').
memupr
is not affected by a program's locale.
memupr
returns a character pointer to the memory block.
memupr
is size_t
. If a negative number
is passed, massive overlaying of memory occurs.
#include <stdio.h> #include <lcstring.h> static struct PART { size_t length; char *word; } sentence[] = { { 4, "This " }, { 8, "example " }, { 6, "shows " }, { 8, "the use " }, { 7, "of the " }, { 7, "memupr " }, { 11, "function.n" } }; #define NUM_PARTS (sizeof(sentence)/sizeof(struct PART)) main() { int x; for (x = 0; x < NUM_PARTS; x++) { memupr(sentence[x].word, sentence[x].length); fputs(sentence[x].word, stdout); } exit(0); }
memlwr
, memxlt
, strupr
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.