Created
January 25, 2019 03:27
-
-
Save jieniu/d905d1943d73bff69d678a20c9e7d468 to your computer and use it in GitHub Desktop.
how to parse a unsigned long string
This file contains 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
// "14714368837763236677" -> -3732375235946314939 | |
long long_id = new BigInteger(str_id.trim()).longValue(); | |
// -3732375235946314939 -> "cc33f07f74f48345" | |
String str_hex_id = Long.toHexString(long_id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment