#[cfg(any(feature = "complete", feature = "diagnostics"))]
#[inline(never)]
pub(crate) fn push_all(out: &mut String, texts: &[&str]) {
for text in texts {
out.push_str(text);
}
}
#[cfg(feature = "complete")]
#[inline(never)]
pub(crate) fn push_char(out: &mut String, c: char) {
out.push(c);
}
#[inline(never)]
pub(crate) fn char_count(text: &str) -> usize {
text.chars().count()
}
#[cfg(feature = "complete")]
#[inline(never)]
pub(crate) fn same_name(a: &str, b: &str) -> bool {
a.eq_ignore_ascii_case(b)
}
#[cfg(feature = "complete")]
#[inline(never)]
pub(crate) fn replace_char(text: &str, from: char, to: &str) -> String {
text.replace(from, to)
}
#[cfg(feature = "complete")]
#[inline(never)]
pub(crate) fn split_once_eq(text: &str) -> Option<(&str, &str)> {
let at = text.bytes().position(|byte| byte == b'=')?;
Some((&text[..at], &text[at + 1..]))
}