Skip to content

Commit 5962d7e

Browse files
committed
Expand docs of <$Int>::from_str_radix, based on that of char::to_digit
1 parent 71da1c2 commit 5962d7e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/libcore/num/mod.rs

+18
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,14 @@ macro_rules! int_impl {
132132

133133
/// Converts a string slice in a given base to an integer.
134134
///
135+
/// The string is expected to be an optional `+` or `-` sign
136+
/// followed by digits.
135137
/// Leading and trailing whitespace represent an error.
138+
/// Digits are a subset of these characters, depending on `radix`:
139+
///
140+
/// * `0-9`
141+
/// * `a-z`
142+
/// * `A-Z`
136143
///
137144
/// # Panics
138145
///
@@ -1301,7 +1308,18 @@ macro_rules! uint_impl {
13011308

13021309
/// Converts a string slice in a given base to an integer.
13031310
///
1311+
/// The string is expected to be an optional `+` sign
1312+
/// followed by digits.
13041313
/// Leading and trailing whitespace represent an error.
1314+
/// Digits are a subset of these characters, depending on `radix`:
1315+
///
1316+
/// * `0-9`
1317+
/// * `a-z`
1318+
/// * `A-Z`
1319+
///
1320+
/// # Panics
1321+
///
1322+
/// This function panics if `radix` is not in the range from 2 to 36.
13051323
///
13061324
/// # Examples
13071325
///

0 commit comments

Comments
 (0)