
2 Aug
2006
2 Aug
'06
8:57 a.m.
But for some reason, I need to perform replacement on a C-string (char *), is replace_all_regex safe to do so? Will replace_all_regex handle memory issue for us?
Of course this would be impossible. Boost.Regex can't know how the memory was allocated (e.g. malloc or new or some custom allocator), or even if it *was* allocated.
Why do you need to operate on raw char*'s? Why can't you operate on an std::string?
I got the string (char*s), which is too big (>10M), from an external library, it's too slow to convert the raw string to std::string before it is handled by replace_all_regex