More changes

This commit is contained in:
kdeng00
2024-04-08 16:46:53 -04:00
parent 8551f4a6c4
commit ce0ec470ec
8 changed files with 31 additions and 28 deletions
+2 -2
View File
@@ -5,8 +5,8 @@ pub struct Checks {
}
impl Checks {
pub fn is_number(val: &String) -> bool {
return val.is_numeric();
pub fn is_numeric(text: &String) -> bool {
text.parse::<f64>().is_ok()
}
// TODO: Implement
+3 -3
View File
@@ -8,15 +8,15 @@ pub struct Conversions {
impl Conversions {
pub fn to_lower_char(val: &mut char) {
if val.is_alphabetic() {
val = val.to_lowercase();
*val = val.to_lowercase().next().unwrap();
}
}
pub fn initialize_values(&self) {
}
pub fn print_value<T>(&self, val: T) {
pub fn print_value<T: std::fmt::Debug>(&self, val: T) {
println!("Going to print value");
println!("{}", val);
println!("{:?}", val);
}
}