Java String Chop Left chopLeft(String str, char delimiter)

Here you can find the source of chopLeft(String str, char delimiter)

Description

chop Left

License

Open Source License

Declaration

public static String chopLeft(String str, char delimiter) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static String chopLeft(String str, char delimiter) {
        if (str == null || "".equals(str)) {
            return str;
        }//from w  ww.  ja va 2s  .c o  m
        int pos;
        int len = str.length();
        for (pos = 0; pos < len; pos++) {
            if (str.charAt(pos) != delimiter) {
                break;
            }
        }
        return str.substring(pos);
    }
}

Related

  1. chopFromLeft(String text, char character, int count)
  2. ChopLf(String this_string, String chomp_off)