Skip to content

Commit 81431b6

Browse files
committed
Merge pull request #360 from PatrickPijnappel/patch-1
String(_, radix:): fix documentation
2 parents 38af324 + a3d5af5 commit 81431b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/IntegerParsing.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ extension ${Self} {
119119
/// Construct from an ASCII representation in the given `radix`.
120120
///
121121
/// If `text` does not match the regular expression
122-
/// "[+-][0-9a-zA-Z]+", or the value it denotes in the given `radix`
122+
/// "[+-]?[0-9a-zA-Z]+", or the value it denotes in the given `radix`
123123
/// is not representable, the result is `nil`.
124124
public init?(_ text: String, radix: Int = 10) {
125125
if let value = _parseAsciiAs${'' if signed else 'U'}IntMax(

0 commit comments

Comments
 (0)