This is how I left pad a string with zeroes:
String.format("%16s", cardTypeString.trim()).replace(' ', '0');
Is there a better way to do this? I don't like the .replace(' ', '0')
part.
I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...
No comments:
Post a Comment