Convert Hex String to Hex Value

前端 未结 4 1035
别那么骄傲
别那么骄傲 2020-12-21 11:30

I have a large hex string

abcdef...

and I want to convert it to

0xab 0xcd 0xef 

Are there any functions

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-21 12:27

    the kit of parts you need in C is

    for (..,i+=2)
    

    and

    strtoul(..,16)
    

提交回复
热议问题