mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-28 14:20:46 +00:00
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user