diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/style/str.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/style/str.rs b/components/style/str.rs index 70fbe538533..92febb40824 100644 --- a/components/style/str.rs +++ b/components/style/str.rs @@ -148,6 +148,6 @@ pub fn str_join<I, T>(strs: I, join: &str) -> String /// Returns true if a given string has a given prefix with case-insensitive match. pub fn starts_with_ignore_ascii_case(string: &str, prefix: &str) -> bool { - string.len() > prefix.len() && + string.len() >= prefix.len() && string.as_bytes()[0..prefix.len()].eq_ignore_ascii_case(prefix.as_bytes()) } |