Class LineEndingConverter
- java.lang.Object
-
- io.wcm.devops.conga.generator.util.LineEndingConverter
-
public final class LineEndingConverter extends Object
Utility methods for handling line endings in files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
convertTo(String normalizedValue, LineEndings lineEndings)
Converts all unix line endings to the given line ending style.static String
normalizeToUnix(String value)
Normalizes all line endings that may be Windows or MacOS-style and converts them to Unix-style line endings.
-
-
-
Method Detail
-
normalizeToUnix
public static String normalizeToUnix(String value)
Normalizes all line endings that may be Windows or MacOS-style and converts them to Unix-style line endings.- Parameters:
value
- String containing any line endings.- Returns:
- String containing only unix line endings.
-
convertTo
public static String convertTo(String normalizedValue, LineEndings lineEndings)
Converts all unix line endings to the given line ending style.- Parameters:
normalizedValue
- String with line endings normalized to Unix-stylelineEndings
- Line ending style.- Returns:
- String with the given line ending style.
-
-