We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2922c1 + 1254c34 commit 1be4156Copy full SHA for 1be4156
src/libcore/num/mod.rs
@@ -132,15 +132,11 @@ macro_rules! int_impl {
132
///
133
/// Leading and trailing whitespace represent an error.
134
135
- /// # Arguments
136
- ///
137
- /// * src - A string slice
138
- /// * radix - The base to use. Must lie in the range [2 .. 36]
139
140
- /// # Return value
+ /// # Examples
141
142
- /// `Err(ParseIntError)` if the string did not represent a valid number.
143
- /// Otherwise, `Ok(n)` where `n` is the integer represented by `src`.
+ /// ```
+ /// assert_eq!(u32::from_str_radix("A", 16), Some(10));
144
#[stable(feature = "rust1", since = "1.0.0")]
145
#[allow(deprecated)]
146
pub fn from_str_radix(src: &str, radix: u32) -> Result<$T, ParseIntError> {
0 commit comments