The boost::replace_all uses insert and erase to perform a change, those
method are missing from sstring.
Following the std:string implemntation the implementation of both
functionalities is based on the replace method, either as c string
replace or with templated iterators.
Not all the variation of insert, replace and erase where added, but it
will be possible to add them in the future if needed by calling the
existing functionality.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the back method that return a reference or const reference to
the last char in an sstring.
find_last_of, which return the index of the last occurance of a char in
the string.
And append with append C string to a string.
The logic and definition are similiar to the std::string.
Note that following the std::string definition, calling back on an empty
string is forbiden and the results are undefined.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This patch adds some of the common functionalities from std:string to
sstring.
It adds length (implement by size() )
It define the constant npos to indicate no possition.
It adds the at (reference and const reference)
It define the find char and find sstring methods
and the substr method
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
need merge sstring