1 16 package org.apache.taglibs.string; 17 18 import javax.servlet.jsp.JspException ; 19 import org.apache.commons.lang.StringUtils; 20 21 34 public class StripStartTag extends StringTagSupport { 35 36 private String delimiter; 37 38 public StripStartTag() { 39 super(); 40 } 41 42 47 public String getDelimiter() { 48 return this.delimiter; 49 } 50 51 56 public void setDelimiter(String delimiter) { 57 this.delimiter = delimiter; 58 } 59 60 61 62 public String changeString(String text) throws JspException { 63 return StringUtils.stripStart(text, delimiter); 64 } 65 66 public void initAttributes() { 67 68 this.delimiter = null; 69 70 } 71 72 } 73 | Popular Tags |