rustils 0.1.23

Utilities for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::mem::{ forget, transmute };
use parse::string::*;

impl ToStr for String {

    fn to_str(self)
        -> &'static str {

        unsafe {
            let ret = transmute(&self as &str);
            forget(self);
            ret
        }
    }
}