- java.lang.Object
-
- org.eclipse.jgit.ignore.internal.Strings
-
-
Constructor Summary
Constructors Constructor Description Strings()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisDirectoryPattern(String pattern)Check if pattern is a directory pattern ending with a path separatorstatic List<String>split(String pattern, char slash)Splits given string to substrings by given separatorstatic StringstripTrailing(String pattern, char c)Strip trailing charactersstatic StringstripTrailingWhitespace(String pattern)Strip trailing whitespace characters
-
-
-
Method Detail
-
stripTrailing
public static String stripTrailing(String pattern, char c)
Strip trailing characters- Parameters:
pattern- non nullc- character to remove- Returns:
- new string with all trailing characters removed
-
stripTrailingWhitespace
public static String stripTrailingWhitespace(String pattern)
Strip trailing whitespace characters- Parameters:
pattern- non null- Returns:
- new string with all trailing whitespace removed
-
isDirectoryPattern
public static boolean isDirectoryPattern(String pattern)
Check if pattern is a directory pattern ending with a path separator- Parameters:
pattern- non null- Returns:
trueif the last character, which is not whitespace, is a path separator
-
-