Add ability to get all common sequences
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user