MCPcopy Create free account
hub / github.com/curtcox/JLHTTP / trimLeft

Method trimLeft

src/main/java/net/freeutils/httpserver/HTTPServer.java:2601–2606  ·  view source on GitHub ↗

Returns the given string with all occurrences of the given character removed from its left side. @param s the string to trim @param c the character to remove @return the trimmed string

(String s, char c)

Source from the content-addressed store, hash-verified

2599 * @return the trimmed string
2600 */
2601 public static String trimLeft(String s, char c) {
2602 int len = s.length();
2603 int start;
2604 for (start = 0; start < len && s.charAt(start) == c; start++);
2605 return start == 0 ? s : s.substring(start);
2606 }
2607
2608 /**
2609 * Trims duplicate consecutive occurrences of the given character within the

Callers 1

getParamsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected