mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
v0.34.5. Also adding webpack config and package-lock.json
This commit is contained in:
@@ -139,6 +139,17 @@ function isHTML(str) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Generates a random alphanumeric string with N characters
|
||||
function generateRandomString(n) {
|
||||
var str = "",
|
||||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
str += chars.charAt(Math.floor(Math.random() * chars.length));
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
export {getIndicesOf, convertTimeMsToTimeElapsedString, longestCommonStart,
|
||||
isString, isPositiveNumber, containsAllStrings, formatNumber,
|
||||
numOccurrences, numNetscriptOperators, isHTML};
|
||||
numOccurrences, numNetscriptOperators, isHTML, generateRandomString};
|
||||
|
||||
Reference in New Issue
Block a user