public class StringUtils extends Object
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
formatHtml(String source,
boolean bReplaceNl,
boolean bReplaceTag,
boolean bReplaceQuote)
This method is used to insert HTML block dynamically
|
static String |
pad(String src,
char padChar,
boolean rightPad,
int totalLength)
Pad string object
|
static String |
replaceString(String source,
Map<String,Object> args)
Replace string.
|
static String |
replaceString(String source,
Object[] args)
Replace string
|
static String |
replaceString(String source,
String oldStr,
String newStr)
This is a string replacement method.
|
static byte[] |
toByteArray(String hexString)
Get byte array from hex string
|
static String |
toHexString(byte[] res)
Get hex string from byte array
|
public static final String replaceString(String source, String oldStr, String newStr)
public static final String replaceString(String source, Map<String,Object> args)
public static final String formatHtml(String source, boolean bReplaceNl, boolean bReplaceTag, boolean bReplaceQuote)
source
- the HTML code to be processesbReplaceNl
- if true '\n' will be replaced by bReplaceTag
- if true '<' will be replaced by < and
'>' will be replaced by >bReplaceQuote
- if true '\"' will be replaced by "public static final String pad(String src, char padChar, boolean rightPad, int totalLength)
public static final String toHexString(byte[] res)
public static final byte[] toByteArray(String hexString)
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.