remove Start - Java java.lang

Java examples for java.lang:String Strip

Description

remove Start

Demo Code


//package com.java2s;

public class Main {
    public static String removeStart(String string, String prefix) {
        if (string.startsWith(prefix)) {
            return string.substring(prefix.length());
        }//from  www  .  jav  a2s . c  om
        return string;
    }
}

Related Tutorials