convert a string to lowercase
#include <string.h> char *strlwr( char *s1 ); char *_strlwr( char *s1 ); char __far *_fstrlwr( char __far *s1 );
The strlwr() functions replaces the string s1 with lowercase characters, by invoking the tolower() function for each character in the string.
The _strlwr() function is identical to strlwr(). Use _strlwr() for ANSI/ISO naming conventions.
The _fstrlwr() function is a data-model-independent form of the strlwr() function. It accepts far pointer arguments, and returns a far pointer. It is most useful in mixed memory model applications.
the address of the original string s1
#include <stdio.h>
#include <string.h>
char source[] = { "A mixed-case STRING" };
void main()
{
printf( "%s\n", source );
printf( "%s\n", strlwr( source ) );
printf( "%s\n", source );
}
produces the output:
A mixed-case STRING a mixed-case string a mixed-case string
WATCOM
_strlwr() conforms to ANSI/ISO naming conventions.
| Safety: | |
|---|---|
| Interrupt handler | Yes |
| Signal handler | Yes |
| Thread | Yes |