What is String pointer operations

chinmay.sahoo

New member
The library introduces the notion of string pointer structures, i.e. “fat” pointers that contain,besides the normal pointer to the contents, a count and a pointer to the parent string. Pointer operations on this structures are few, and they try to mimic the normal pointer behavior.

This pointers can be used as iterator objects to go through a portion or all the string contents. You can obtain an iterator to the beginning of the string with:


String str = new_string(15);
Stringp pStr = begin(str);

The polymorphic function “begin” returns a pointer to the beginning of a sequential container. The operations supported with string pointers are:
 
Back
Top