use crate::{enums::StringBounds, BoundsPosition, CaseMatchMode};
pub(crate) fn strs_to_string_bounds<'a>(
strs: &'a [&str],
case_mode: CaseMatchMode,
mode: BoundsPosition,
) -> Vec<StringBounds<'a>> {
strs.into_iter()
.map(|txt| StringBounds::new(mode, *txt, true, case_mode))
.collect()
}
pub(crate) fn strs_to_negative_string_bounds<'a>(
strs: &'a [&str],
case_mode: CaseMatchMode,
mode: BoundsPosition,
) -> Vec<StringBounds<'a>> {
strs.into_iter()
.map(|txt| StringBounds::new(mode, *txt, false, case_mode))
.collect()
}
pub(crate) fn pairs_to_string_bounds<'a>(
pairs: &'a [(&str, bool)],
mode: BoundsPosition,
) -> Vec<StringBounds<'a>> {
pairs
.into_iter()
.map(|(txt, ci)| StringBounds::new(mode, *txt, true, CaseMatchMode::insensitive(*ci)))
.collect()
}