Created
April 24, 2020 05:04
-
-
Save timsneath/23b234f096b264629fcdfe8f210ddc0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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