fn flt_str_to_exp(flt: &str) -> i32 {
        let mut non_zero_encountered = false;
        let mut dot_encountered = false;
        for (i, c) in flt.chars().enumerate() {
            if c == '.' {
                if non_zero_encountered {
                    return (i as i32) - 1;
                }
                dot_encountered = true;
            } else if c != '0' {
                if dot_encountered {
                    return 1 - (i as i32);
                }
                non_zero_encountered = true;
            }
        }
        (flt.len() as i32) - 1
    }
/// flt_str_to_exp - used in to_precision
///
/// This function traverses a string representing a number,
/// returning the floored log10 of this number.
///
used in to_precision
This function traverses a string representing a number,
returning the floored log10 of this number.
used in to_precision This function traverses a string representing a number returning the floored log10 of this number .
fn flt_str_to_exp(flt: &str) -> i32 {
        let mut non_zero_encountered = false;
        let mut dot_encountered = false;
        for (i, c) in flt.chars().enumerate() {
            if c == '.' {
                if non_zero_encountered {
                    return (i as i32) - 1;
                }
                dot_encountered = true;
            } else if c != '0' {
                if dot_encountered {
                    return 1 - (i as i32);
                }
                non_zero_encountered = true;
            }
        }
        (flt.len() as i32) - 1
    }
fn flt_str_to_exp ( flt : & str ) -> i32 { let mut non_zero_encountered = false ; let mut dot_encountered = false ; for ( i , c ) in flt . chars ( ) . enumerate ( ) { if c == '.' { if non_zero_encountered { return ( i as i32 ) - 1 ; } dot_encountered = true ; } else if c != '0' { if dot_encountered { return 1 - ( i as i32 ) ; } non_zero_encountered = true ; } } ( flt . len ( ) as i32 ) - 1 }
flt_str_to_exp - used in to_precision
This function traverses a string representing a number,
returning the floored log10 of this number.
flt_str_to_exp - used in to_precision This function traverses a string representing a number returning the floored log10 of this number .
flt
&str