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.
1 parent b46343a commit f258e8bCopy full SHA for f258e8b
Sources/Random.swift
@@ -180,6 +180,18 @@ public class Random {
180
return string(bits: bits, secRand: &secRand)
181
}
182
183
+ /// Generates a random string.
184
+ ///
185
+ /// - parameter bits: Minimum bits of entropy.
186
187
+ /// - return: A string. The returned string's entropy is a multiple of the _entropy per char_
188
+ /// for the character set in use. The entropy returned is the smallest such multiple larger
189
+ /// than `bits`.
190
+ public func string(bits: Float, charSet: CharSet) -> String {
191
+ var secRand = true
192
+ return string(bits: bits, charSet: charSet, secRand: &secRand)
193
+ }
194
+
195
/// Generates a random string.
196
///
197
/// - parameter bits: Minimum bits of entropy.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments