Issue #42, AS3 - displaying hex

Graph button changed to icon
This commit is contained in:
Jindra Pet��k
2013-03-20 22:01:52 +01:00
parent dfd9bfae3c
commit 50cce00fe0
10 changed files with 105 additions and 64 deletions
@@ -185,6 +185,9 @@ public class Helper {
return ret;
}
public static String bytesToHexString(byte bytes[]){
return bytesToHexString(bytes,0);
}
public static String bytesToHexString(byte bytes[], int start) {
StringBuilder sb = new StringBuilder();
if (start < bytes.length) {
@@ -320,4 +323,12 @@ public class Helper {
} catch (Exception ex) {
}
}
public static String stripComments(String str){
return str.replaceAll("<ffdec:hex>[^\r\n]*</ffdec:hex>\r?\n", "");
}
public static String hexToComments(String str){
return str.replaceAll("<ffdec:hex>([^\r\n]*)</ffdec:hex>(\r?\n)", "; $1$2");
}
}