Skip to content

Instantly share code, notes, and snippets.

@pnkfelix
Created September 9, 2013 07:03
Show Gist options
  • Save pnkfelix/6492300 to your computer and use it in GitHub Desktop.
Save pnkfelix/6492300 to your computer and use it in GitHub Desktop.
// A substring range
pub struct StrRange<'self> {
start: uint,
length: uint,
source: &'self str,
}
impl<'self> StrRange<'self> {
fn new<'a>(st: uint, ln: uint, ss: &'a str) -> StrRange<'a> {
StrRange { start: st, length: ln, source: ss }
}
}
fn main() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment