User Tools

Site Tools


tips:java:zeropaddedhex
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


tips:java:zeropaddedhex [2009/06/08 12:10] (current) – created erik
Line 1: Line 1:
 +====== Quickly convert a char to a zero padded hex string ======
  
 +<code java>
 +Integer.toHexString(0x100 | (int) '\f').substring(1).toUpperCase(); // '\f' (linefeed) is '0C' in hex
 +</code>
tips/java/zeropaddedhex.txt · Last modified: 2009/06/08 12:10 by erik