Java String Chomp chompHeader(String str, String prex)

Here you can find the source of chompHeader(String str, String prex)

Description

chomp Header

License

Open Source License

Declaration

public static String chompHeader(String str, String prex) 

Method Source Code

//package com.java2s;

public class Main {
    public static String chompHeader(String str, String prex) {
        if (str == null) {
            return "";
        }/*ww  w.ja  v a2 s.  com*/
        if (str.startsWith(prex)) {
            return str.substring(prex.length());
        }
        return str;
    }
}

Related

  1. chomp(String str, String separator)
  2. chomp(String value)
  3. chomp(StringBuilder sb)
  4. chompAllAndTrim(String str)
  5. chompClosureOpen(String expr)
  6. chompLast(String str)
  7. chompLast(String str, String sep)
  8. chompNewLine(String line)