MCPcopy Create free account
hub / github.com/demoth/jake2 / leftFrom

Method leftFrom

qcommon/src/main/java/jake2/qcommon/util/Lib.java:251–258  ·  view source on GitHub ↗

Returns the left part of the string from the last occruence of c.

(String in, char c)

Source from the content-addressed store, hash-verified

249
250 /** Returns the left part of the string from the last occruence of c. */
251 public static String leftFrom(String in, char c) {
252 int pos = in.lastIndexOf(c);
253 if (pos == -1)
254 return "";
255 else if (pos < in.length())
256 return in.substring(0, pos);
257 return "";
258 }
259
260 /** Renames a file. */
261 public static int rename(String oldn, String newn) {

Callers 2

PlayerConfig_MenuInitMethod · 0.95
SpinControl_DrawMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected