Java String Chop chopPrefix(String x, String prefix)

Here you can find the source of chopPrefix(String x, String prefix)

Description

chop Prefix

License

Open Source License

Declaration

public static String chopPrefix(String x, String prefix) 

Method Source Code

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

public class Main {
    public static String chopPrefix(String x, String prefix) {
        if (x.startsWith(prefix))
            return x.substring(prefix.length());
        else// ww  w. ja  v  a2s. co  m
            return null;
    }
}

Related

  1. chopIfMatch(StringBuilder sb, char ch)
  2. chopLast(String value, int chars)
  3. chopLenghtyString(String title, int maxLen)
  4. chopLongLinesAtSpaces(int maxLineLenght, String text)
  5. chopNull(String str)
  6. ChopRt(String this_string, String chomp_off)
  7. chopScheme(String path)
  8. chopScheme(String path)
  9. chopString(String argString, int argLength)