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 2f832d4 commit 34a701aCopy full SHA for 34a701a
yukihookapi-core/src/main/java/com/highcapable/yukihookapi/hook/utils/factory/VariableFactory.kt
@@ -182,7 +182,7 @@ internal object RandomSeed {
182
* @param length 生成长度 - 默认 15
183
* @return [String]
184
*/
185
- internal fun createString(length: Int = 15) = StringBuilder().apply {
186
- for (i in 1..length) append(RANDOM_LETTERS_NUMBERS[(0..RANDOM_LETTERS_NUMBERS.lastIndex).random()])
187
- }.toString()
188
-}
+ internal fun createString(length: Int = 15): String = buildString {
+ repeat(length) { append(RANDOM_LETTERS_NUMBERS.random()) }
+ }
+}
0 commit comments