StrOps::Caps( StrBuf & )

Convert the first character in a string (in place) to uppercase.

Virtual?

No

 

Class

StrOps

 

Arguments

StrBuf &o

the string to capitalize

Returns

void

 

Example

#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