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

discontinued

This package enables you to easily convert string characters in many formats to their value.

example/lib/main.dart

import 'package:string_converter/converter.dart';

void main() {
  StringConverter converter = StringConverter();
  String text = "Hello";

  // Convert utf8 to utf16
  String utf16 = converter.toUTF16(text);
  print("UTF16: $utf16");
  // 0048 0065 006c 006c 006f

  // Convert utf8 to utf32
  String utf32 = converter.toUTF32(text);
  print("UTF32: $utf32");
  // 00000048 00000065 0000006c 0000006c 0000006f

  // Convert utf8 to binary
  String binary = converter.toBinary(text);
  print("Binary: $binary");
  // 1001000 1100101 1101100 1101100 1101111

  // Convert utf8 to octal
  String octal = converter.toOctal(text);
  print("Octal: $octal");
  // 110 145 154 154 157

  // You can also call the extension method directly on the input
  print(utf32.toUTF8());
  // print Hello

  print(text.toBinary(format: true));
}
0
likes
40
pub points
49%
popularity

Publisher

unverified uploader

This package enables you to easily convert string characters in many formats to their value.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on string_converter