Package org.biojava.nbio.core.util
Class StringManipulationHelper
- java.lang.Object
-
- org.biojava.nbio.core.util.StringManipulationHelper
-
public class StringManipulationHelper extends Object
A utility class for commonStringmanipulation tasks. All functions are static methods.- Author:
- Amr AL-Hossary
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringconvertStreamToString(InputStream stream)static booleanequalsToIgnoreEndline(String expected, String actual)compares two strings for equality, line by line, ignoring any difference of end line delimiters contained within the 2 Strings.static booleanequalsToXml(String expected, String actual)static Stringjoin(AbstractCollection<String> s, String delimiter)static StringpadLeft(String s, int n)static StringpadRight(String s, int n)
-
-
-
Method Detail
-
convertStreamToString
public static String convertStreamToString(InputStream stream)
- Parameters:
stream-- Returns:
-
equalsToIgnoreEndline
public static boolean equalsToIgnoreEndline(String expected, String actual)
compares two strings for equality, line by line, ignoring any difference of end line delimiters contained within the 2 Strings. This method should be used if and only if two Strings are considered identical when all nodes are identical including their relative order. Generally useful when asserting identity of automatically regenerated XML or PDB.- Parameters:
expected-actual-
-
equalsToXml
public static boolean equalsToXml(String expected, String actual)
-
join
public static String join(AbstractCollection<String> s, String delimiter)
-
-