@@ -74,31 +74,25 @@ pub enum SignFormat {
74
74
75
75
impl Copy for SignFormat { }
76
76
77
- /**
78
- * Converts an integral number to its string representation as a byte vector.
79
- * This is meant to be a common base implementation for all integral string
80
- * conversion functions like `to_string()` or `to_str_radix()`.
81
- *
82
- * # Arguments
83
- * - `num` - The number to convert. Accepts any number that
84
- * implements the numeric traits.
85
- * - `radix` - Base to use. Accepts only the values 2-36.
86
- * - `sign` - How to emit the sign. Options are:
87
- * - `SignNone`: No sign at all. Basically emits `abs(num)`.
88
- * - `SignNeg`: Only `-` on negative values.
89
- * - `SignAll`: Both `+` on positive, and `-` on negative numbers.
90
- * - `f` - a callback which will be invoked for each ascii character
91
- * which composes the string representation of this integer
92
- *
93
- * # Return value
94
- * A tuple containing the byte vector, and a boolean flag indicating
95
- * whether it represents a special value like `inf`, `-inf`, `NaN` or not.
96
- * It returns a tuple because there can be ambiguity between a special value
97
- * and a number representation at higher bases.
98
- *
99
- * # Failure
100
- * - Fails if `radix` < 2 or `radix` > 36.
101
- */
77
+ /// Converts an integral number to its string representation as a byte vector.
78
+ /// This is meant to be a common base implementation for all integral string
79
+ /// conversion functions like `to_string()` or `to_str_radix()`.
80
+ ///
81
+ /// # Arguments
82
+ ///
83
+ /// - `num` - The number to convert. Accepts any number that
84
+ /// implements the numeric traits.
85
+ /// - `radix` - Base to use. Accepts only the values 2-36.
86
+ /// - `sign` - How to emit the sign. Options are:
87
+ /// - `SignNone`: No sign at all. Basically emits `abs(num)`.
88
+ /// - `SignNeg`: Only `-` on negative values.
89
+ /// - `SignAll`: Both `+` on positive, and `-` on negative numbers.
90
+ /// - `f` - a callback which will be invoked for each ascii character
91
+ /// which composes the string representation of this integer
92
+ ///
93
+ /// # Panics
94
+ ///
95
+ /// - Panics if `radix` < 2 or `radix` > 36.
102
96
fn int_to_str_bytes_common < T : Int > ( num : T , radix : uint , sign : SignFormat , f: |u8|) {
103
97
assert ! ( 2 <= radix && radix <= 36 ) ;
104
98
@@ -415,10 +409,8 @@ pub fn float_to_str_bytes_common<T: Float>(
415
409
( buf, false )
416
410
}
417
411
418
- /**
419
- * Converts a number to its string representation. This is a wrapper for
420
- * `to_str_bytes_common()`, for details see there.
421
- */
412
+ /// Converts a number to its string representation. This is a wrapper for
413
+ /// `to_str_bytes_common()`, for details see there.
422
414
#[ inline]
423
415
pub fn float_to_str_common < T : Float > (
424
416
num : T , radix : uint , negative_zero : bool ,
0 commit comments