Here you can find the source of chomp(String options)
public static String chomp(String options)
//package com.java2s; //License from project: Apache License public class Main { public static String chomp(String options) { if (options == null || options.isEmpty()) { return options; }/*from www . ja v a2s .co m*/ return options.substring(0, options.length() - 1); } }