MCPcopy Create free account
hub / github.com/c0ny1/captcha-killer / trimStart

Method trimStart

src/main/java/utils/Util.java:311–329  ·  view source on GitHub ↗

将字符串开头空格去掉 @param str @return

(String str)

Source from the content-addressed store, hash-verified

309 * @return
310 */
311 public static String trimStart(String str) {
312 if (str == "" || str == null) {
313 return str;
314 }
315
316 final char[] value = str.toCharArray();
317 int start = 0, last = 0 + str.length();
318 int end = last;
319 while ((start <= end) && (value[start] <= ' ')) {
320 start++;
321 }
322 if (start == 0 && end == last) {
323 return str;
324 }
325 if (start >= end) {
326 return "";
327 }
328 return str.substring(start, end);
329 }
330}

Callers 2

mainMethod · 0.95
parserRequestMethod · 0.95

Calls

no outgoing calls

Tested by 1

mainMethod · 0.76