public class StringUtils extends Object
Modifier and Type | Method and Description |
---|---|
static List<String> |
loadFileAsList(File f)
Loads each line of the file as a list of strings.
|
static Set<String> |
loadFileAsSet(File f)
Loads the contents of a file as a set of strings, with each line being
treated as a separate instance.
|
static String |
unescapeHTML(String source)
Returns the provided string where all HTML special characters
(e.g.
|
static void |
unescapeHTML(StringBuilder source)
Modifies the provided
StringBuilder by replacing all HTML special
characters (e.g. |
public static List<String> loadFileAsList(File f)
IOError
- if any exception occurs while reading the filepublic static Set<String> loadFileAsSet(File f)
IOError
- if any exception occurs while reading the filepublic static final String unescapeHTML(String source)
) have been replaced with their utf8 equivalents.
source
- a String possibly containing escaped HTML characterspublic static final void unescapeHTML(StringBuilder source)
StringBuilder
by replacing all HTML special
characters (e.g. ) with their utf8 equivalents.
source
- a String possibly containing escaped HTML charactersCopyright © 2012. All Rights Reserved.