strings_constants 0.0.2 copy "strings_constants: ^0.0.2" to clipboard
strings_constants: ^0.0.2 copied to clipboard

A collection of string constants.

The Package provides a list of frequently used String constants, duplicating Python's string.py library

Usage #

To use this plugin, add string_constants as a dependency in your pubspec.yaml file.

Example #

String onlyDigits = Strings.digits;   // onlyDigits = '0123456789';

// Generates random string from ASCII Characters with defined length
String generateRandomString(int len) {
  final r = Random();
  const _chars = Strings.asciiCharacters;

  return List.generate(len, (index) => _chars[r.nextInt(_chars.length)]).join();
}
0
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A collection of string constants.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on strings_constants