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

C/C++ API Documentation | 2025.2

# StrPtr::Length()

Return the length of this `StrPtr`.

Virtual? | No |
Class | `StrPtr` |
Arguments | None |
Returns | `int` | the length of this `StrPtr`

## Example

Copy

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

    int main( int argc, char **argv )
    {
        StrBuf str1;

        str1.Set( "This string" );

        printf( "%s is %d bytes long\n", str1, str1.Length() );
        return 0;
    }

Executing the preceding code produces the following output:

    This string is 11 bytes long

Your search for returned results