Here you can find the source of chop(String str)
Parameter | Description |
---|---|
str | the input string |
public static String chop(String str)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w . j a v a2s. co m * Remove the last char in a string * * @param str * the input string * @return string after remove of last char */ public static String chop(String str) { return str.substring(0, str.length() - 1); } }