spanley 0.2.3

This is my generic string span, his name is Spanley.
Documentation

Spanley

This is a generic string span library, it is meant for use with tokenizing applications or the likes.

Serde support and API changes are coming soon.

Please do look into string interners before deciding to use this crate to make sure this actually fits your use case. String intering features may also get added on later to this project, but that is a much later spot on the roadmap.

Example

Input

use spanley::Span;

let message = "\
  This is my generic string span, his name is Spanley.\n\
  Say hi Spanley!\
";

let spanley = Span::new(message, 57, 11).unwrap();

println!("{}", spanley);

Output

hi Spanley!