|
Boost : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2006-07-03 22:06:01
Pavel Vozenilek wrote:
> "Jeff Garland" wrote:
>
>> s.trim().to_upper().append(" more stuff ");
>>
> I don't know why but something reminded me awk.
>
> Imagine having class named "superstring_list":
>
> superstring_list s;
> vector<string> =
> s.load_from_file("filename).split_by("\n").trim().replace("a",
> "b").reverse().remove_first();
Well that's interesting -- I've done some experimenting, it really wouldn't be
difficult to support a super string collection that exports string functions,
but the semantics get a bit odd on some things. Like is append(string)
equivalent to push_back -- I think it would have to be. I can hear the cries
now about bloated interface. Of course
template<class T> append(const T& val);
is a unique function. Anyway, I can see this getting a bit messy.
Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk