| 123456789101112131415161718192021222324252627 |
- #ifndef __COMMON_UTIL_H
- #define __COMMON_UTIL_H
- #include <stdint.h>
- /**
- * 整形字符串转整形数字
- */
- int my_atoi(char *str);
- /**
- * 整形转字符串
- * num:待转的数据,str:目标地址,radix:进制2,8,10,16
- */
- char* my_itoa(int num,char* str,int radix);
- //字节流转HEX字符串
- void byteToHexStr(const unsigned char* source, char* dest, int sourceLen);
- void bytesToHex(char * dest, uint8_t * source, uint16_t source_length);
- uint8_t memmem(uint8_t * result,uint16_t result_length, uint8_t *rdystring,uint8_t rdylen);
- #endif
|