pub fn separator<S: Into<Option<char>>>(mut self, sep: S) -> Result {
        if let Some(sep) = sep.into() {
            if sep.len_utf8() != 1 {
                Err(Error::InvalidSeparator(sep))
            } else {
                let mut buf = [0];
                sep.encode_utf8(&mut buf);
                self.thou_sep = Some(buf[0]);
                Ok(self)
            }
        } else {
            self.thou_sep = None;
            Ok(self)
        }
    }
/// Set the thousands separator.
///
/// If separator is not a single byte, an error is returned.
Set the thousands separator.
If separator is not a single byte, an error is returned.
Set the thousands separator . If separator is not a single byte an error is returned .
pub fn separator<S: Into<Option<char>>>(mut self, sep: S) -> Result {
        if let Some(sep) = sep.into() {
            if sep.len_utf8() != 1 {
                Err(Error::InvalidSeparator(sep))
            } else {
                let mut buf = [0];
                sep.encode_utf8(&mut buf);
                self.thou_sep = Some(buf[0]);
                Ok(self)
            }
        } else {
            self.thou_sep = None;
            Ok(self)
        }
    }
pub fn separator < S : Into < Option < char > > > ( mut self , sep : S ) -> Result { if let Some ( sep ) = sep . into ( ) { if sep . len_utf8 ( ) != 1 { Err ( Error :: InvalidSeparator ( sep ) ) } else { let mut buf = [ 0 ] ; sep . encode_utf8 ( & mut buf ) ; self . thou_sep = Some ( buf [ 0 ] ) ; Ok ( self ) } } else { self . thou_sep = None ; Ok ( self ) } }
Set the thousands separator.
Set the thousands separator .
mut self
sep
S
mut self
sep
S