Class TreeStringUtils
- java.lang.Object
-
- ru.vyarus.yaml.updater.parse.common.TreeStringUtils
-
public final class TreeStringUtils extends java.lang.ObjectString utilities related to yaml model trees.- Since:
- 21.05.2021
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringfillTo(java.lang.String line, int length)Appends whitespace to line to increase its length.static java.lang.StringshiftRight(java.lang.String line, int length)Appends whitespace before line.static java.lang.Stringwhitespace(int length)
-
-
-
Method Detail
-
whitespace
public static java.lang.String whitespace(int length)
- Parameters:
length- number of whitespace characters to aggregate- Returns:
- string with specified number of whitespace characters
-
shiftRight
public static java.lang.String shiftRight(java.lang.String line, int length)Appends whitespace before line.- Parameters:
line- line to prepend whitespacelength- number of whitespace chars to prepend- Returns:
- line with prepended whitespace
-
fillTo
public static java.lang.String fillTo(java.lang.String line, int length)Appends whitespace to line to increase its length.- Parameters:
line- line to increaselength- target line length- Returns:
- line is appended whitespace (if required) not less then specified length
-
-