pub fn strip_prefix<'a>(s: &'a str, expected_prefix: &str) -> &'a str {
    if s.starts_with(expected_prefix) {
        return &s[expected_prefix.len()..]
    }
    panic!("Expected {} to start with {}", s, expected_prefix)
}
/// Strips the given prefix from the front of s if s starts with that prefix.
/// If the prefix does not match panic - only strings known to start with the prefix should be
/// passed to this function.
Strips the given prefix from the front of s if s starts with that prefix.
If the prefix does not match panic - only strings known to start with the prefix should be
passed to this function.
Strips the given prefix from the front of s if s starts with that prefix . If the prefix does not match panic - only strings known to start with the prefix should be passed to this function .
pub fn strip_prefix<'a>(s: &'a str, expected_prefix: &str) -> &'a str {
    if s.starts_with(expected_prefix) {
        return &s[expected_prefix.len()..]
    }
    panic!("Expected {} to start with {}", s, expected_prefix)
}
pub fn strip_prefix < ' a > ( s : & ' a str , expected_prefix : & str ) -> & ' a str { if s . starts_with ( expected_prefix ) { return & s [ expected_prefix . len ( ) .. ] } panic ! ( " " s expected_prefix ) }
Strips the given prefix from the front of s if s starts with that prefix.
Strips the given prefix from the front of s if s starts with that prefix .
s
&'a str
expected_prefix
&str
s
&'a str
expected_prefix
&str