com.virtuosotechnologies.lib.util
Class StringUtils

java.lang.Object
  extended bycom.virtuosotechnologies.lib.util.StringUtils

public final class StringUtils
extends Object

Various utilities for strings.


Method Summary
static String createDisplayable(String str)
          Converts a string to its Java munged representation.
static String fixNewlines(String str)
          Change the newline characters in the given string to the platform default.
static String modifyNewlines(String str, String newline)
          Change the newline characters in the given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fixNewlines

public static String fixNewlines(String str)
Change the newline characters in the given string to the platform default. This is identical to calling modifyNewlines(str, null).

Parameters:
str - string to modify
Returns:
modified string

modifyNewlines

public static String modifyNewlines(String str,
                                    String newline)
Change the newline characters in the given string.

Parameters:
str - string to modify
newline - newline string to use, or null to use the platform default
Returns:
modified string

createDisplayable

public static String createDisplayable(String str)
Converts a string to its Java munged representation.

Parameters:
str - string to munge
Returns:
munged string