@@ -83,13 +83,6 @@ pub enum SignFormat {
83
83
/// - `f` - a callback which will be invoked for each ascii character
84
84
/// which composes the string representation of this integer
85
85
///
86
- /// # Return value
87
- ///
88
- /// A tuple containing the byte vector, and a boolean flag indicating
89
- /// whether it represents a special value like `inf`, `-inf`, `NaN` or not.
90
- /// It returns a tuple because there can be ambiguity between a special value
91
- /// and a number representation at higher bases.
92
- ///
93
86
/// # Panics
94
87
///
95
88
/// - Panics if `radix` < 2 or `radix` > 36.
@@ -147,40 +140,41 @@ fn int_to_str_bytes_common<T: Int>(num: T, radix: uint, sign: SignFormat, f: |u8
147
140
}
148
141
}
149
142
150
- /**
151
- * Converts a number to its string representation as a byte vector.
152
- * This is meant to be a common base implementation for all numeric string
153
- * conversion functions like `to_string()` or `to_str_radix()`.
154
- *
155
- * # Arguments
156
- * - `num` - The number to convert. Accepts any number that
157
- * implements the numeric traits.
158
- * - `radix` - Base to use. Accepts only the values 2-36. If the exponential notation
159
- * is used, then this base is only used for the significand. The exponent
160
- * itself always printed using a base of 10.
161
- * - `negative_zero` - Whether to treat the special value `-0` as
162
- * `-0` or as `+0`.
163
- * - `sign` - How to emit the sign. See `SignFormat`.
164
- * - `digits` - The amount of digits to use for emitting the fractional
165
- * part, if any. See `SignificantDigits`.
166
- * - `exp_format` - Whether or not to use the exponential (scientific) notation.
167
- * See `ExponentFormat`.
168
- * - `exp_capital` - Whether or not to use a capital letter for the exponent sign, if
169
- * exponential notation is desired.
170
- *
171
- * # Return value
172
- * A tuple containing the byte vector, and a boolean flag indicating
173
- * whether it represents a special value like `inf`, `-inf`, `NaN` or not.
174
- * It returns a tuple because there can be ambiguity between a special value
175
- * and a number representation at higher bases.
176
- *
177
- * # Panics
178
- * - Panics if `radix` < 2 or `radix` > 36.
179
- * - Panics if `radix` > 14 and `exp_format` is `ExpDec` due to conflict
180
- * between digit and exponent sign `'e'`.
181
- * - Panics if `radix` > 25 and `exp_format` is `ExpBin` due to conflict
182
- * between digit and exponent sign `'p'`.
183
- */
143
+ /// Converts a number to its string representation as a byte vector.
144
+ /// This is meant to be a common base implementation for all numeric string
145
+ /// conversion functions like `to_string()` or `to_str_radix()`.
146
+ ///
147
+ /// # Arguments
148
+ ///
149
+ /// - `num` - The number to convert. Accepts any number that
150
+ /// implements the numeric traits.
151
+ /// - `radix` - Base to use. Accepts only the values 2-36. If the exponential notation
152
+ /// is used, then this base is only used for the significand. The exponent
153
+ /// itself always printed using a base of 10.
154
+ /// - `negative_zero` - Whether to treat the special value `-0` as
155
+ /// `-0` or as `+0`.
156
+ /// - `sign` - How to emit the sign. See `SignFormat`.
157
+ /// - `digits` - The amount of digits to use for emitting the fractional
158
+ /// part, if any. See `SignificantDigits`.
159
+ /// - `exp_format` - Whether or not to use the exponential (scientific) notation.
160
+ /// See `ExponentFormat`.
161
+ /// - `exp_capital` - Whether or not to use a capital letter for the exponent sign, if
162
+ /// exponential notation is desired.
163
+ ///
164
+ /// # Return value
165
+ ///
166
+ /// A tuple containing the byte vector, and a boolean flag indicating
167
+ /// whether it represents a special value like `inf`, `-inf`, `NaN` or not.
168
+ /// It returns a tuple because there can be ambiguity between a special value
169
+ /// and a number representation at higher bases.
170
+ ///
171
+ /// # Panics
172
+ ///
173
+ /// - Panics if `radix` < 2 or `radix` > 36.
174
+ /// - Panics if `radix` > 14 and `exp_format` is `ExpDec` due to conflict
175
+ /// between digit and exponent sign `'e'`.
176
+ /// - Panics if `radix` > 25 and `exp_format` is `ExpBin` due to conflict
177
+ /// between digit and exponent sign `'p'`.
184
178
pub fn float_to_str_bytes_common < T : Float > (
185
179
num : T , radix : uint , negative_zero : bool ,
186
180
sign : SignFormat , digits : SignificantDigits , exp_format : ExponentFormat , exp_upper : bool
0 commit comments