Here you can find the source of chomp(String value)
public static String chomp(String value)
//package com.java2s; //License from project: Apache License public class Main { public static String chomp(String value) { if (value.length() > 0) { return value.substring(0, value.length() - 1); }/* w ww .java 2s. c om*/ return value; } }