Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

C/C++ API Documentation | 2026.1

# 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

Copy

    #include &lt;stdhdrs.h&gt;
    #include &lt;strbuf.h&gt;
    #include &lt;strops.h&gt;

    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

Your search for returned results