MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / trimLeading

Method trimLeading

src/main/java/net/optifine/util/StrUtils.java:779–801  ·  view source on GitHub ↗
(String str, String chars)

Source from the content-addressed store, hash-verified

777 }
778
779 public static String trimLeading(String str, String chars)
780 {
781 if (str != null && chars != null)
782 {
783 int i = str.length();
784
785 for (int j = 0; j < i; ++j)
786 {
787 char c0 = str.charAt(j);
788
789 if (chars.indexOf(c0) < 0)
790 {
791 return str.substring(j);
792 }
793 }
794
795 return "";
796 }
797 else
798 {
799 return str;
800 }
801 }
802
803 public static String trimTrailing(String str, String chars)
804 {

Callers 1

trimMethod · 0.95

Calls 2

lengthMethod · 0.80
indexOfMethod · 0.45

Tested by

no test coverage detected