fn maybe_remove_trailing_redundant_chars(s: String, alternate_form: bool) -> String {
    if !alternate_form && s.contains('.') {
        // only truncate floating point values when not in alternate form
        let s = remove_trailing_zeros(s);
        remove_trailing_decimal_point(s)
    } else {
        s
    }
}
/// If s represents a floating point value, trailing zeros and a possibly trailing
/// decimal point will be removed.
/// This function does NOT work with decimal commas.
If s represents a floating point value, trailing zeros and a possibly trailing
decimal point will be removed.
This function does NOT work with decimal commas.
If s represents a floating point value trailing zeros and a possibly trailing decimal point will be removed . This function does NOT work with decimal commas .
fn maybe_remove_trailing_redundant_chars(s: String, alternate_form: bool) -> String {
    if !alternate_form && s.contains('.') {
        // only truncate floating point values when not in alternate form
        let s = remove_trailing_zeros(s);
        remove_trailing_decimal_point(s)
    } else {
        s
    }
}
fn maybe_remove_trailing_redundant_chars ( s : String , alternate_form : bool ) -> String { if ! alternate_form && s . contains ( '.' ) { // only truncate floating point values when not in alternate form let s = remove_trailing_zeros ( s ) ; remove_trailing_decimal_point ( s ) } else { s } }
If s represents a floating point value, trailing zeros and a possibly trailing
decimal point will be removed.
If s represents a floating point value trailing zeros and a possibly trailing decimal point will be removed .
s
String
alternate_form
bool