This is just a note that I checked in new static extension methods for commonly
used functions on the str, vec and option types. These are implemented as impls
called 'extensions' in their respective core mods and reexported at the top
level of core, so they are available everywhere by default. So far the docs
haven't materialized on the web site, but here's an example of what they're
like:
fn main() {
let a = some("hello, world");
if a.is_some() {
let b = a.get().split_char(',');
let c = b.map { |d| d.trim() };
let d = c.foldl("") {|e, f| e + "\n" + f };
io::println(d);
}
}
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev