MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / trim

Method trim

src/main/java/com/volmit/adapt/util/Form.java:931–937  ·  view source on GitHub ↗

Trim a string to a length, then append ... at the end if it extends the limit @param s the string @param l the limit @return the modified string

(String s, int l)

Source from the content-addressed store, hash-verified

929 * @return the modified string
930 */
931 public static String trim(String s, int l) {
932 if (s.length() <= l) {
933 return s;
934 }
935
936 return s.substring(0, l) + "...";
937 }
938
939 /**
940 * Get a class name into a configuration/filename key For example,

Callers 14

buildTitleMethod · 0.80
onTickMethod · 0.80
seePotionEffectMethod · 0.80
nextToMethod · 0.80
nextValueMethod · 0.80
rejectAnyMethod · 0.80
buildChildrenMethod · 0.80
capitalizeMethod · 0.80
capitalizeWordsMethod · 0.80
wrapMethod · 0.80
wrapPrefixedMethod · 0.80
walkFormatMethod · 0.80

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected