mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
add method
This commit is contained in:
@@ -42,4 +42,11 @@ public class HexUtilTest {
|
||||
Assert.assertArrayEquals(HexUtil.decodeHex(str),
|
||||
HexUtil.decodeHex(str.toUpperCase()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void formatHexTest(){
|
||||
String hex = "e8c670380cb220095268f40221fc748fa6ac39d6e930e63c30da68bad97f885d";
|
||||
String formatHex = HexUtil.format(hex);
|
||||
Assert.assertEquals("e8 8c 67 03 80 cb 22 00 95 26 8f 40 22 1f c7 48 fa 6a c3 9d 6e 93 0e 63 c3 0d a6 8b ad 97 f8 85", formatHex);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user