mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
HexUtil#format方法增加prefix参数
This commit is contained in:
@@ -72,6 +72,13 @@ public class HexUtilTest {
|
||||
Assert.assertEquals("e8 c6 70 38 0c b2 20 09 52 68 f4 02 21 fc 74 8f a6 ac 39 d6 e9 30 e6 3c 30 da 68 ba d9 7f 88 5d", formatHex);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void formatHexTest2(){
|
||||
final String hex = "e8c670380cb220095268f40221fc748fa6";
|
||||
final String formatHex = HexUtil.format(hex, "0x");
|
||||
Assert.assertEquals("0xe8 0xc6 0x70 0x38 0x0c 0xb2 0x20 0x09 0x52 0x68 0xf4 0x02 0x21 0xfc 0x74 0x8f 0xa6", formatHex);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void decodeHexTest(){
|
||||
final String s = HexUtil.encodeHexStr("6");
|
||||
|
Reference in New Issue
Block a user