prepend0x function
Append "0x" at the begin of a string.
@param input The input string. @return The prepended string.
Implementation
String prepend0x(String input) {
if (input.startsWith("0x") || input.startsWith("0X")) {
return input;
} else {
return "0x" + input;
}
}