Add ability to get all common sequences

This commit is contained in:
Dima Kudosh
2016-02-15 13:51:29 +03:00
parent 302257e54a
commit 26d8f5f78e
3 changed files with 104 additions and 21 deletions
+12
View File
@@ -0,0 +1,12 @@
pub fn slice_str(string: &str, start: usize, end: usize) -> Option<&str>
{
if start >= end{
return None
}
if start > string.len() || end > string.len(){
return None
}
unsafe{
Some(string.slice_unchecked(start, end))
}
}