StrOps::Caps( StrBuf & )
Convert the first character in a string (in place) to uppercase.
Virtual? |
No |
|
Class |
||
Arguments |
|
the string to capitalize |
Returns |
|
Example
Copy
#include <stdhdrs.h>
#include <strbuf.h>
#include <strops.h>
int main( int argc, char **argv )
{
StrBuf sb;
sb.Set( "xyzzy" );
printf( "Before: %s\n", sb.Text() );
StrOps::Caps( sb );
printf( "After: %s\n", sb.Text() );
return 0;
}
Executing the preceding code produces the following output:
Before: xyzzy After: Xyzzy