Skip to content

Instantly share code, notes, and snippets.

@timsneath
Created April 24, 2020 05:04
Show Gist options
  • Select an option

  • Save timsneath/23b234f096b264629fcdfe8f210ddc0d to your computer and use it in GitHub Desktop.

Select an option

Save timsneath/23b234f096b264629fcdfe8f210ddc0d to your computer and use it in GitHub Desktop.
String numToString(BigInt number) {
final buf = StringBuffer();
for (var v = 0; v < 8; v++) {
final charCode = (number & BigInt.parse('0xFF' + ('00' * v))) >> v * 8;
buf.write(String.fromCharCode(charCode.toInt()));
}
return buf.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment