use crate::camel_case::*;
use crate::cobol_case::*;
use crate::kebab_case::*;
use crate::macro_case::*;
use crate::options::Options;
use crate::pascal_case::*;
use crate::snake_case::*;
use crate::train_case::*;
pub trait Caser<T: AsRef<str>> {
fn to_camel_case(&self) -> String;
fn to_camel_case_with_options(&self, opts: &Options) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_camel_case_with_options instead"
)]
fn to_camel_case_with_sep(&self, seps: &str) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_camel_case_with_options instead"
)]
fn to_camel_case_with_keep(&self, kept: &str) -> String;
fn to_cobol_case(&self) -> String;
fn to_cobol_case_with_options(&self, opts: &Options) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_cobol_case_with_options instead"
)]
fn to_cobol_case_with_nums_as_word(&self) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_cobol_case_with_options instead"
)]
fn to_cobol_case_with_sep(&self, seps: &str) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_cobol_case_with_options instead"
)]
fn to_cobol_case_with_keep(&self, kept: &str) -> String;
fn to_kebab_case(&self) -> String;
fn to_kebab_case_with_options(&self, opts: &Options) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_kebab_case_with_options instead"
)]
fn to_kebab_case_with_nums_as_word(&self) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_kebab_case_with_options instead"
)]
fn to_kebab_case_with_sep(&self, seps: &str) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_kebab_case_with_options instead"
)]
fn to_kebab_case_with_keep(&self, kept: &str) -> String;
fn to_macro_case(&self) -> String;
fn to_macro_case_with_options(&self, opts: &Options) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_macro_case_with_options instead"
)]
fn to_macro_case_with_nums_as_word(&self) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_macro_case_with_options instead"
)]
fn to_macro_case_with_sep(&self, seps: &str) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_macro_case_with_options instead"
)]
fn to_macro_case_with_keep(&self, kept: &str) -> String;
fn to_pascal_case(&self) -> String;
fn to_pascal_case_with_options(&self, opts: &Options) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_pascal_case_with_options instead"
)]
fn to_pascal_case_with_sep(&self, seps: &str) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_pascal_case_with_options instead"
)]
fn to_pascal_case_with_keep(&self, kept: &str) -> String;
fn to_snake_case(&self) -> String;
fn to_snake_case_with_options(&self, opts: &Options) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_snake_case_with_options instead"
)]
fn to_snake_case_with_nums_as_word(&self) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_snake_case_with_options instead"
)]
fn to_snake_case_with_sep(&self, seps: &str) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_snake_case_with_options instead"
)]
fn to_snake_case_with_keep(&self, kept: &str) -> String;
fn to_train_case(&self) -> String;
fn to_train_case_with_options(&self, opts: &Options) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_train_case_with_options instead"
)]
fn to_train_case_with_nums_as_word(&self) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_train_case_with_options instead"
)]
fn to_train_case_with_sep(&self, seps: &str) -> String;
#[deprecated(
since = "0.4.0",
note = "Should use to_train_case_with_options instead"
)]
fn to_train_case_with_keep(&self, kept: &str) -> String;
}
impl<T: AsRef<str>> Caser<T> for T {
#[inline(always)]
fn to_camel_case(&self) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
camel_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_camel_case_with_options(&self, opts: &Options) -> String {
camel_case_with_options(self.as_ref(), opts)
}
#[inline(always)]
fn to_camel_case_with_sep(&self, seps: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: seps,
keep: "",
};
camel_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_camel_case_with_keep(&self, kept: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: kept,
};
camel_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_cobol_case(&self) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
cobol_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_cobol_case_with_options(&self, opts: &Options) -> String {
cobol_case_with_options(self.as_ref(), opts)
}
#[inline(always)]
fn to_cobol_case_with_nums_as_word(&self) -> String {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
cobol_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_cobol_case_with_sep(&self, seps: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: seps,
keep: "",
};
cobol_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_cobol_case_with_keep(&self, kept: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: kept,
};
cobol_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_kebab_case(&self) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
kebab_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_kebab_case_with_options(&self, opts: &Options) -> String {
kebab_case_with_options(self.as_ref(), opts)
}
#[inline(always)]
fn to_kebab_case_with_nums_as_word(&self) -> String {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
kebab_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_kebab_case_with_sep(&self, seps: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: seps,
keep: "",
};
kebab_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_kebab_case_with_keep(&self, kept: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: kept,
};
kebab_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_macro_case(&self) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
macro_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_macro_case_with_options(&self, opts: &Options) -> String {
macro_case_with_options(self.as_ref(), opts)
}
#[inline(always)]
fn to_macro_case_with_nums_as_word(&self) -> String {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
macro_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_macro_case_with_sep(&self, seps: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: seps,
keep: "",
};
macro_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_macro_case_with_keep(&self, kept: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: kept,
};
macro_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_pascal_case(&self) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
pascal_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_pascal_case_with_options(&self, opts: &Options) -> String {
pascal_case_with_options(self.as_ref(), opts)
}
#[inline(always)]
fn to_pascal_case_with_sep(&self, seps: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: seps,
keep: "",
};
pascal_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_pascal_case_with_keep(&self, kept: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: kept,
};
pascal_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_snake_case(&self) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
snake_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_snake_case_with_options(&self, opts: &Options) -> String {
snake_case_with_options(self.as_ref(), opts)
}
#[inline(always)]
fn to_snake_case_with_nums_as_word(&self) -> String {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
snake_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_snake_case_with_sep(&self, seps: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: seps,
keep: "",
};
snake_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_snake_case_with_keep(&self, kept: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: kept,
};
snake_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_train_case(&self) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
train_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_train_case_with_options(&self, opts: &Options) -> String {
train_case_with_options(self.as_ref(), opts)
}
#[inline(always)]
fn to_train_case_with_nums_as_word(&self) -> String {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
train_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_train_case_with_sep(&self, seps: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: seps,
keep: "",
};
train_case_with_options(self.as_ref(), &opts)
}
#[inline(always)]
fn to_train_case_with_keep(&self, kept: &str) -> String {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: kept,
};
train_case_with_options(self.as_ref(), &opts)
}
}
#[cfg(test)]
mod tests_of_caser {
use super::*;
#[test]
fn it_should_convert_to_camel_case() {
let result = "foo_bar100%BAZQux".to_camel_case();
assert_eq!(result, "fooBar100BazQux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_camel_case();
assert_eq!(result, "fooBar100BazQux");
}
#[test]
fn it_should_convert_to_camel_case_with_sep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "_",
keep: "",
};
let result = "foo_bar100%BAZQux".to_camel_case_with_options(&opts);
assert_eq!(result, "fooBar100%BazQux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_camel_case_with_options(&opts);
assert_eq!(result, "fooBar100%BazQux");
}
#[test]
fn it_should_convert_to_camel_case_with_keep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "%",
};
let result = "foo_bar100%BAZQux".to_camel_case_with_options(&opts);
assert_eq!(result, "fooBar100%BazQux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_camel_case_with_options(&opts);
assert_eq!(result, "fooBar100%BazQux");
}
#[test]
fn it_should_convert_to_cobol_case() {
let result = "foo_bar100%BAZQux".to_cobol_case();
assert_eq!(result, "FOO-BAR100-BAZ-QUX");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_cobol_case();
assert_eq!(result, "FOO-BAR100-BAZ-QUX");
}
#[test]
fn it_should_convert_to_cobol_case_with_nums_as_word() {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
let result = "foo_bar100%BAZQux".to_cobol_case_with_options(&opts);
assert_eq!(result, "FOO-BAR-100-BAZ-QUX");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_cobol_case_with_options(&opts);
assert_eq!(result, "FOO-BAR-100-BAZ-QUX");
}
#[test]
fn it_should_convert_to_cobol_case_with_sep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "_",
keep: "",
};
let result = "foo_bar100%BAZQux".to_cobol_case_with_options(&opts);
assert_eq!(result, "FOO-BAR100%-BAZ-QUX");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_cobol_case_with_options(&opts);
assert_eq!(result, "FOO-BAR100%-BAZ-QUX");
}
#[test]
fn it_should_convert_to_cobol_case_with_keep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "%",
};
let result = "foo_bar100%BAZQux".to_cobol_case_with_options(&opts);
assert_eq!(result, "FOO-BAR100%-BAZ-QUX");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_cobol_case_with_options(&opts);
assert_eq!(result, "FOO-BAR100%-BAZ-QUX");
}
#[test]
fn it_should_convert_to_kebab_case() {
let result = "foo_bar100%BAZQux".to_kebab_case();
assert_eq!(result, "foo-bar100-baz-qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_kebab_case();
assert_eq!(result, "foo-bar100-baz-qux");
}
#[test]
fn it_should_convert_to_kebab_case_with_nums_as_word() {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
let result = "foo_bar100%BAZQux".to_kebab_case_with_options(&opts);
assert_eq!(result, "foo-bar-100-baz-qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_kebab_case_with_options(&opts);
assert_eq!(result, "foo-bar-100-baz-qux");
}
#[test]
fn it_should_convert_to_kebab_case_with_sep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "_",
keep: "",
};
let result = "foo_bar100%BAZQux".to_kebab_case_with_options(&opts);
assert_eq!(result, "foo-bar100%-baz-qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_kebab_case_with_options(&opts);
assert_eq!(result, "foo-bar100%-baz-qux");
}
#[test]
fn it_should_convert_to_kebab_case_with_keep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "%",
};
let result = "foo_bar100%BAZQux".to_kebab_case_with_options(&opts);
assert_eq!(result, "foo-bar100%-baz-qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_kebab_case_with_options(&opts);
assert_eq!(result, "foo-bar100%-baz-qux");
}
#[test]
fn it_should_convert_to_macro_case() {
let result = "foo_bar100%BAZQux".to_macro_case();
assert_eq!(result, "FOO_BAR100_BAZ_QUX");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_macro_case();
assert_eq!(result, "FOO_BAR100_BAZ_QUX");
}
#[test]
fn it_should_convert_to_macro_case_with_nums_as_word() {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
let result = "foo_bar100%BAZQux".to_macro_case_with_options(&opts);
assert_eq!(result, "FOO_BAR_100_BAZ_QUX");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_macro_case_with_options(&opts);
assert_eq!(result, "FOO_BAR_100_BAZ_QUX");
}
#[test]
fn it_should_convert_to_macro_case_with_sep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "_",
keep: "",
};
let result = "foo_bar100%BAZQux".to_macro_case_with_options(&opts);
assert_eq!(result, "FOO_BAR100%_BAZ_QUX");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_macro_case_with_options(&opts);
assert_eq!(result, "FOO_BAR100%_BAZ_QUX");
}
#[test]
fn it_should_convert_to_macro_case_with_keep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "%",
};
let result = "foo_bar100%BAZQux".to_macro_case_with_options(&opts);
assert_eq!(result, "FOO_BAR100%_BAZ_QUX");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_macro_case_with_options(&opts);
assert_eq!(result, "FOO_BAR100%_BAZ_QUX");
}
#[test]
fn it_should_convert_to_pascal_case() {
let result = "foo_bar100%BAZQux".to_pascal_case();
assert_eq!(result, "FooBar100BazQux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_pascal_case();
assert_eq!(result, "FooBar100BazQux");
}
#[test]
fn it_should_convert_to_pascal_case_with_nums_as_word() {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
let result = "foo_bar100%BAZQux".to_pascal_case_with_options(&opts);
assert_eq!(result, "FooBar100BazQux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_pascal_case_with_options(&opts);
assert_eq!(result, "FooBar100BazQux");
}
#[test]
fn it_should_convert_to_pascal_case_with_sep() {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "_",
keep: "",
};
let result = "foo_bar100%BAZQux".to_pascal_case_with_options(&opts);
assert_eq!(result, "FooBar100%BazQux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_pascal_case_with_options(&opts);
assert_eq!(result, "FooBar100%BazQux");
}
#[test]
fn it_should_convert_to_pascal_case_with_keep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "%",
};
let result = "foo_bar100%BAZQux".to_pascal_case_with_options(&opts);
assert_eq!(result, "FooBar100%BazQux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_pascal_case_with_options(&opts);
assert_eq!(result, "FooBar100%BazQux");
}
#[test]
fn it_should_convert_to_snake_case() {
let result = "foo_bar100%BAZQux".to_snake_case();
assert_eq!(result, "foo_bar100_baz_qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_snake_case();
assert_eq!(result, "foo_bar100_baz_qux");
}
#[test]
fn it_should_convert_to_snake_case_with_nums_as_word() {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
let result = "foo_bar100%BAZQux".to_snake_case_with_options(&opts);
assert_eq!(result, "foo_bar_100_baz_qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_snake_case_with_options(&opts);
assert_eq!(result, "foo_bar_100_baz_qux");
}
#[test]
fn it_should_convert_to_snake_case_with_sep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "_",
keep: "",
};
let result = "foo_bar100%BAZQux".to_snake_case_with_options(&opts);
assert_eq!(result, "foo_bar100%_baz_qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_snake_case_with_options(&opts);
assert_eq!(result, "foo_bar100%_baz_qux");
}
#[test]
fn it_should_convert_to_snake_case_with_keep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "%",
};
let result = "foo_bar100%BAZQux".to_snake_case_with_options(&opts);
assert_eq!(result, "foo_bar100%_baz_qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_snake_case_with_options(&opts);
assert_eq!(result, "foo_bar100%_baz_qux");
}
#[test]
fn it_should_convert_to_train_case() {
let result = "foo_bar100%BAZQux".to_train_case();
assert_eq!(result, "Foo-Bar100-Baz-Qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_train_case();
assert_eq!(result, "Foo-Bar100-Baz-Qux");
}
#[test]
fn it_should_convert_to_train_case_with_nums_as_word() {
let opts = Options {
separate_before_non_alphabets: true,
separate_after_non_alphabets: true,
separators: "",
keep: "",
};
let result = "foo_bar100%BAZQux".to_train_case_with_options(&opts);
assert_eq!(result, "Foo-Bar-100-Baz-Qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_train_case_with_options(&opts);
assert_eq!(result, "Foo-Bar-100-Baz-Qux");
}
#[test]
fn it_should_convert_to_train_case_with_sep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "_",
keep: "",
};
let result = "foo_bar100%BAZQux".to_train_case_with_options(&opts);
assert_eq!(result, "Foo-Bar100%-Baz-Qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_train_case_with_options(&opts);
assert_eq!(result, "Foo-Bar100%-Baz-Qux");
}
#[test]
fn it_should_convert_to_train_case_with_keep() {
let opts = Options {
separate_before_non_alphabets: false,
separate_after_non_alphabets: true,
separators: "",
keep: "%",
};
let result = "foo_bar100%BAZQux".to_train_case_with_options(&opts);
assert_eq!(result, "Foo-Bar100%-Baz-Qux");
let string = String::from("foo_bar100%BAZQux");
let result = string.to_train_case_with_options(&opts);
assert_eq!(result, "Foo-Bar100%-Baz-Qux");
}
}