StrRef::operator +=( int )

Increase a StrRef’s pointer and decrease its length.

Virtual?

No

 

Class

StrRef

 

Arguments

int len

the amount by which to move the pointer

Returns

void

 

Notes

This method has the effect of removing len characters from the beginning of the StrRef. It does not, however, free the memory allocated to those characters.

Example

#include <iostream>

#include <stdhdrs.h>
#include <strbuf.h>

int main( int argc, char **argv )
{
    char chars[] = "xyzzy";
    StrRef sr = StrRef( chars );

    sr += 3;

    cout << "chars[] = \"" << chars << "\"\n";
    cout << "sr.Text() returns \"" << sr.Text() << "\"\n";
}

Executing the preceding code produces the following output:

chars[] = "xyzzy"
sr.Text() returns "zy"