BOOTSTRAP (kutils) functions
LIBRARY ROUTINE
kstring_upper - convert a string to upper case.
LIBRARY CALL
char *kstring_upper(
const char *istr,
char *ostr)
INPUT
- istr - The string to convert to upper case.
OUTPUT
- ostr - The string that holds the converted string.
If variable is NULL, the routine allocates the
necessary space to hold the result.
RETURN VALUE
The converted string, 'ostr', if it is not NULL, or a
pointer to the resulting allocated string if it is NULL.
NULL is returned if 'istr' is NULL, or if an error occurs.
DESCRIPTION
This routine performs a character by character
scan for lowercase characters. When an lowercase
character is found, it calls the function, toupper(),
to get the uppercase equivalent, and replaces the lower
case character.
Note that if 'ostr' is non-NULL, the calling routine
must ensure that 'ostr' points to a memory buffer
large enough to hold the converted string plus a
null character. If the buffer is not large enough,
memory will be overwritten resulting in unpredicable
program failure.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
Allocates the space for the output if 'ostr' is NULL
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/strings.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.