List of utility methods to do String Unpad
byte[] | unPad(byte[] bytes) un Pad int padded = (int) bytes[bytes.length - 1]; int targetLength = bytes.length - padded; byte[] out = new byte[targetLength]; System.arraycopy(bytes, 0, out, 0, targetLength); return out; |
void | unPad(byte[] src, int start, byte[] dest) Strip single padding base that Complete Genomics v2 reads contain, if present. System.arraycopy(src, start, dest, 0, CG2_PAD_POSITION); System.arraycopy(src, start + CG2_PAD_POSITION + 1, dest, CG2_PAD_POSITION, CG2_RAW_READ_LENGTH - CG2_PAD_POSITION); |
String | unPadLeft(String s, char c) Unpad from left. if ((s.trim().length() == 0) && (c == ' ')) return (new Character(c)).toString(); else if ((s.trim().length() == 0)) return s; s = s.trim(); int fill = 0, end = s.length(); while ((fill < end) && (s.charAt(fill) == c)) fill++; ... |
String | unPadRight(String s, char c) Unpad from right. if ((s.trim().length() == 0) && (c == ' ')) return Character.toString(c); else if ((s.trim().length() == 0)) return s; String sTrim = s.trim(); int end = sTrim.length(); while ((0 < end) && (sTrim.charAt(end - 1) == c)) end--; ... |
String | unpadZeroString(String string) unpad Zero String if (string == null) { return string; StringBuffer buf = new StringBuffer(string); while (buf.charAt(0) == zeroArray[0]) { buf = buf.deleteCharAt(0); return buf.toString(); ... |