pub fn len(s: &str) -> usize {
s.chars().count()
}
pub fn parse_int(s: &str) -> Result<i64, String> {
s.trim().parse::<i64>().map_err(|_| format!("ParseError: '{}'", s))
}
pub fn parse_float(s: &str) -> Result<f64, String> {
s.trim().parse::<f64>().map_err(|_| format!("ParseError: '{}'", s))
}
pub fn concat(a: &str, b: &str) -> String {
format!("{}{}", a, b)
}
pub fn to_upper(s: &str) -> String {
s.to_uppercase()
}
pub fn to_lower(s: &str) -> String {
s.to_lowercase()
}
pub fn starts_with(s: &str, prefix: &str) -> bool {
s.starts_with(prefix)
}
pub fn ends_with(s: &str, suffix: &str) -> bool {
s.ends_with(suffix)
}
pub fn contains(s: &str, pat: &str) -> bool {
s.contains(pat)
}