Crates.io | str-utils |
lib.rs | str-utils |
version | 0.1.7 |
source | src |
created_at | 2020-07-18 19:32:08.965832 |
updated_at | 2023-09-11 02:45:02.409954 |
description | This crate provides some traits to extend types which implement `AsRef<[u8]>` or `AsRef |
homepage | https://magiclen.org/str-utils |
repository | https://github.com/magiclen/str-utils |
max_upload_size | |
id | 266657 |
size | 30,035 |
This crate provides some traits to extend types which implement AsRef<[u8]>
or AsRef<str>
.
use str_utils::*;
assert_eq!(true, "foobar".starts_with_ignore_ascii_case("FoO"));
assert_eq!(Some(1), "photo.jpg".ends_with_ignore_ascii_case_multiple(&[".png", ".jpg", ".gif"]));
assert_eq!(true, "http".eq_ignore_ascii_case_with_uppercase("HTTP")); // faster than `eq_ignore_ascii_case`
https://crates.io/crates/str-utils