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

C/C++ API Documentation | 2026.1

# StrRef::Null()

Return a null `StrPtr`.

Virtual? | No |
Class | `StrRef` |
Arguments | None |
Returns | `StrPtr` | an empty `StrPtr`

## Notes

`StrRef::Null()` is a static function.

## Example

Copy

    #include &lt;iostream&gt;

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

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

        str1.Set( "abc" );
        StrRef sr = StrRef( str1 );

        if ( sr == StrRef::Null() )
            cout &lt;&lt; "str1 was null\n";
        else
            cout &lt;&lt; "str1 was not null\n";
    }

Executing the preceding code produces the following output:

    str1 was not null

Your search for returned results