@@ -54,36 +54,36 @@ pub enum SignFormat {
54
54
55
55
static DIGIT_E_RADIX : uint = ( 'e' as uint ) - ( 'a' as uint ) + 11 u;
56
56
57
- /**
58
- * Converts a number to its string representation as a byte vector.
59
- * This is meant to be a common base implementation for all numeric string
60
- * conversion functions like `to_string()` or `to_str_radix()`.
61
- *
62
- * # Arguments
63
- * - `num` - The number to convert. Accepts any number that
64
- * implements the numeric traits.
65
- * - `radix` - Base to use. Accepts only the values 2-36. If the exponential notation
66
- * is used, then this base is only used for the significand. The exponent
67
- * itself always printed using a base of 10.
68
- * - `negative_zero` - Whether to treat the special value `-0` as
69
- * `-0` or as `+0`.
70
- * - `sign` - How to emit the sign. See `SignFormat`.
71
- * - `digits` - The amount of digits to use for emitting the fractional
72
- * part, if any. See `SignificantDigits`.
73
- * - `exp_format` - Whether or not to use the exponential (scientific) notation.
74
- * See `ExponentFormat`.
75
- * - `exp_capital` - Whether or not to use a capital letter for the exponent sign, if
76
- * exponential notation is desired.
77
- * - `f` - A closure to invoke with the bytes representing the
78
- * float.
79
- *
80
- * # Panics
81
- * - Panics if `radix` < 2 or `radix` > 36.
82
- * - Panics if `radix` > 14 and `exp_format` is `ExpDec` due to conflict
83
- * between digit and exponent sign `'e'`.
84
- * - Panics if `radix` > 25 and `exp_format` is `ExpBin` due to conflict
85
- * between digit and exponent sign `'p'`.
86
- */
57
+ /// Converts a number to its string representation as a byte vector.
58
+ /// This is meant to be a common base implementation for all numeric string
59
+ /// conversion functions like `to_string()` or `to_str_radix()`.
60
+ ///
61
+ /// # Arguments
62
+ ///
63
+ /// - `num` - The number to convert. Accepts any number that
64
+ /// implements the numeric traits.
65
+ /// - `radix` - Base to use. Accepts only the values 2-36. If the exponential notation
66
+ /// is used, then this base is only used for the significand. The exponent
67
+ /// itself always printed using a base of 10.
68
+ /// - `negative_zero` - Whether to treat the special value `-0` as
69
+ /// `-0` or as `+0`.
70
+ /// - `sign` - How to emit the sign. See `SignFormat`.
71
+ /// - `digits` - The amount of digits to use for emitting the fractional
72
+ /// part, if any. See `SignificantDigits`.
73
+ /// - `exp_format` - Whether or not to use the exponential (scientific) notation.
74
+ /// See `ExponentFormat`.
75
+ /// - `exp_capital` - Whether or not to use a capital letter for the exponent sign, if
76
+ /// exponential notation is desired.
77
+ /// - `f` - A closure to invoke with the bytes representing the
78
+ /// float.
79
+ ///
80
+ /// # Panics
81
+ ///
82
+ /// - Panics if `radix` < 2 or `radix` > 36.
83
+ /// - Panics if `radix` > 14 and `exp_format` is `ExpDec` due to conflict
84
+ /// between digit and exponent sign `'e'`.
85
+ /// - Panics if `radix` > 25 and `exp_format` is `ExpBin` due to conflict
86
+ /// between digit and exponent sign `'p'`.
87
87
pub fn float_to_str_bytes_common < T : Float , U > (
88
88
num : T ,
89
89
radix : uint ,
0 commit comments