public class StringUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
byte2hex(byte[] binput) |
static String |
calcEANCheckDigit(String first12digits)
Calculates the check digit for an EAN barcode
|
static String |
encodeXML(String sValue)
XML templates as used for velocity require some special characters to be
escaped.
|
static byte[] |
hex2byte(String sinput) |
static String |
stringInBetween(String input,
String startString,
String endString) |
public static String encodeXML(String sValue)
Note that there's a problem with the single quote because the xml escape
sequence '
is not standard html. To avoid problems when
the escape sequences cannot be removed in some cases we use
'
instead.
sValue
- the String to be escapedpublic static String byte2hex(byte[] binput)
public static byte[] hex2byte(String sinput)
public static String stringInBetween(String input, String startString, String endString)
Copyright © 2021. All rights reserved.