ascii 0.0.5 copy "ascii: ^0.0.5" to clipboard
ascii: ^0.0.5 copied to clipboard

Dart 1 only

Easy access to the ASCII symbols by their names and literals. Also includes information about decimal and hexadecimal codes.

example/example.dart

import "package:ascii/ascii.dart";

void main() {
  var c = 32;
  // By name
  if (c >= Ascii.NUMBER_0 && c <= Ascii.NUMBER_9) {
  }
  if (c >= Ascii.A && c <= Ascii.Z) {
  }
  if (c == Ascii.ESC) {
  }
  if (c == Ascii.LEFT_SQUARE_BRACKET) {
  }
  if (c == Ascii.DOLLAR_SIGN) {
  }

  // By literal
  var ascii = Ascii.CODES;
  if (c >= ascii["0"] && c <= ascii["9"]) {
  }
  if (c >= ascii["A"] && c <= ascii["Z"]) {
  }
  if (c == ascii["\u001b"]) {
  }
  if (c == ascii["["]) {
  }
  if (c == ascii["\$"]) {
  }
}
0
likes
35
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

Easy access to the ASCII symbols by their names and literals. Also includes information about decimal and hexadecimal codes.

Homepage

License

BSD-3-Clause (license)

More

Packages that depend on ascii