2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2026-04-04 02:08:21 +00:00
This commit is contained in:
2021-07-14 05:16:40 +03:00
parent 7971c836b7
commit 737397da11
50 changed files with 6238 additions and 4926 deletions

13
lib/src/Misc/Global.dart Normal file
View File

@@ -0,0 +1,13 @@
import 'dart:math';
class Global {
static String generateCode(
[int length = 16,
chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"]) {
var rand = Random();
return String.fromCharCodes(Iterable.generate(
length, (_) => chars.codeUnitAt(rand.nextInt(chars.length))));
}
}