Class Jdk8
java.lang.Object
com.kamikazejam.kamicommon.util.Jdk8
Stand-ins for
String methods added after Java 8.
KamiCommon's always-loaded modules target Java 8 so that 1.8.x servers can load them, which rules
out String.repeat(int) and String.strip(), both Java 11. These are the same
operations, spelled for Java 8.
Internal. Use the JDK methods directly in your own code; this exists only because this library cannot.
-
Method Summary
-
Method Details
-
repeat
-
strip
Stand-in forString.strip(), which is Java 11.Deliberately not
trim(): trim cuts everything at or belowU+0020, which drops control characters it should not and keeps Unicode spaces it should. This usesCharacter.isWhitespace(int), asstrip()does.- Parameters:
value- the string to strip- Returns:
- the string without leading or trailing whitespace
-