More changes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user