Package com.tagtraum.beatunes
Class HTMLSupport
- java.lang.Object
-
- com.tagtraum.beatunes.HTMLSupport
-
public final class HTMLSupport extends Object
HTML Support.- Author:
- Hendrik Schreiber
- See Also:
CSSSupport
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
insertHTMLLineBreaks(String s, String delimiters, int maxLineLength)
Inserts HTML line breaks after delimiters.static String
toHTML(String string)
Escape String to HTML.static String
toNonBreakingSpaces(String string)
Replaces regular spaces with HTML non-breaking spaces.
-
-
-
Method Detail
-
toHTML
public static String toHTML(String string)
Escape String to HTML.- Parameters:
string
- string to escape- Returns:
- escaped String
-
toNonBreakingSpaces
public static String toNonBreakingSpaces(String string)
Replaces regular spaces with HTML non-breaking spaces.- Parameters:
string
- string- Returns:
- string with nbsp's
-
insertHTMLLineBreaks
public static String insertHTMLLineBreaks(String s, String delimiters, int maxLineLength)
Inserts HTML line breaks after delimiters. Resulting lines are trimmed of whitespace.- Parameters:
s
- stringdelimiters
- delimiter stringmaxLineLength
- max length per line- Returns:
- string with line breaks (<br>) inserted after delimiter characters
-
-