|
@ -51,6 +51,18 @@ unsigned int convertBinaryStrToInt(char* input){ |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int hexStrLen(int input){ |
|
|
|
|
|
int length = 0; |
|
|
|
|
|
if(input == 0) return 1; |
|
|
|
|
|
for (int x = 0; x <= input; x++){ |
|
|
|
|
|
if(pow(16,x) >= input + 1){ |
|
|
|
|
|
length += x; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return length; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
char* convertIntToHex(int input){ |
|
|
char* convertIntToHex(int input){ |
|
|
int length = 1; |
|
|
int length = 1; |
|
|
int rest; |
|
|
int rest; |
|
|