![]() Chapter Contents |
![]() Previous |
![]() Next |
| memlwr |
| Portability: | SAS/C extension |
| SYNOPSIS | |
| DESCRIPTION | |
| RETURN VALUE | |
| CAUTION | |
| EXAMPLE | |
| RELATED FUNCTIONS | |
| SEE ALSO |
| SYNOPSIS |
#include <lcstring.h> void *memlwr(void *memblk, size_t n);
| DESCRIPTION |
memlwr
scans the first
n
bytes of the input memory
block addressed by
memblk
, converting uppercase
characters ('A' through 'Z') to lowercase characters ('a' through 'z').
memlwr
is not affected
by a program's locale.
| RETURN VALUE |
memlwr
returns a pointer to the memory block.
| CAUTION |
The second argument to
memlwr
is
size_t
. If a negative
number is passed, massive overlaying of memory occurs.
| EXAMPLE |
#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, "memlwr " },
{ 11, "FUNCTION.\n" } };
#define NUM_PARTS (sizeof(sentence)/sizeof(struct PART))
main()
{
int x;
for (x = 0; x < NUM_PARTS; x++) {
memlwr(sentence[x].word, sentence[x].length);
fputs(sentence[x].word, stdout);
}
exit(0);
}
| RELATED FUNCTIONS |
| SEE ALSO |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.