BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kstring_capitalize - convert a string to its capitalized equivalent

LIBRARY CALL

char *kstring_capitalize(
   const char *istr,
   char       *ostr)

INPUT

OUTPUT

RETURN VALUE

The converted output string, 'ostr' if it is not NULL, or a pointer to the resulting allocated string if 'ostr' is NULL. NULL is returned if 'istr' is NULL, or an error occurs.

DESCRIPTION

This routine checks to see that the first character of each word is capitalized. A word is defined to be something separated by whitespace (i.e. separated by one or more tabs or spaces).

Note that if 'ostr' is non-NULL, the calling routine must ensure that 'ostr' points to a memory buffer large enough to hold the capitalized string and terminating 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 necessary 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.