public class TestChartSetUtils { public void test() { /** count:判断两个参数,返回一个int值 */ //(String, String)每个第一个String中的字符在第二个String中出现, //结果递增,返回最终的次数的和,当第一个参数为null时返回0 // int i = CharSetUtils.count("bbcv", "abc");//a=0,b=2,c=1 return:0+2+1=3 //(String, String[])每个第一个String中的字符在第二个String[]中每个元素中出现, //结果递增,返回最终的次数的和,当第一个参数为null时返回0 // int i = CharSetUtils.count("aabc", new String[] { "abc", "cde" });//a=2,b=1,c=1 return:2+1+1=4 /** delete:判断两个参数,返回一个新的String */ //(String, String)返回一个新的String,其字符为第一个String移除在第二个String //中出现的字符后按顺序拼接而成,当一个String为null时返回null // String s = CharSetUtils.delete("aabcd", "ace");//"bd" //(String, String[])返回一个新的String,其字符为第一个String移除在第二个String[] //中每个元素出现的字符后按顺序拼接而成,当一个String为null时返回null // String s = CharSetUtils.delete("aabcd", new String[] { "ab", "de" });//"c" /** evaluateSet:返回一个ChartSet对象,其包含所有未重复的字符 */ // CharSet cs = CharSetUtils.evaluateSet(new String[] { "abc", "bef", "c" });//[b,a,e,c,f] /** keep:判断两个参数,返回一个新的String */ //(String, String)返回一个新的String,其字符为第一个String在第二个String //中出现的字符按顺序拼接而成,当一个String为null时返回null // String s = CharSetUtils.keep("aabcd", "ace");//"aac" //(String, String[])返回一个新的String,其字符为第一个String在第二个String[] //中每个元素出现的字符按顺序拼接而成,当一个String为null时返回null // String s = CharSetUtils.keep("aabcd", new String[] { "ab", "de" });//aabd /** squeeze:判断两个参数,返回一个新的String */ // String s = CharSetUtils.squeeze("aabbbcdx", "abcds");//abcdx String s = CharSetUtils.squeeze("abcdeeff", new String[] { "ab", "de" });//abcdeff System.err.println(s); } /** * @author cuiweiqing 2011-12-6 * @param args */ public static void main(String[] args) { new TestChartSetUtils().test(); } }
发表评论
-
Linux下web项目中File地址错误问题
2014-07-21 12:42 649String path = servletContext.g ... -
Spring MVC 表单提交 405
2014-05-05 10:17 1066Spring MVC post表单提交后返回页面报错:405 ... -
HttpSession清空
2014-04-30 13:41 1037// 销毁session session.invalid ... -
java.io.InvalidClassException异常处理
2013-07-16 16:27 16393java.io.InvalidClassException ... -
发布应用后出现问题的处理思路
2012-07-05 12:11 804发布后的应用,源码都被打成了jar包,无法进行debug,如果 ... -
HTTP404 There is no Action mapped for namespace / and action name login.
2012-06-19 12:04 1598Web项目采用SSH架构,偶尔报“There is no Ac ... -
net.sf.cglib.core.CodeGenerationException: 异常处理
2012-06-12 14:36 0做流程引用了JBPM3的包,在发布的时候经常会报一个异常: ... -
MyEclipse下有main函数类运行报错:Editor does not contain a main type
2012-03-31 10:59 5064出现这种问题的原因是,该java文件所在的包没有被MyEcl ... -
apache.commons.lang2.3学习笔记-CharEncoding
2011-12-06 21:40 934public class TestCharEncodin ... -
apache.commons.lang2.3学习笔记-BooleanUtils
2011-12-06 21:28 1382public class TestBooleanUtil ... -
apache.commons.lang2.3学习笔记-ArrayUtils
2011-12-06 03:18 2232public class Lang { class B ... -
【转】使用Swing皮肤机制 更换皮肤
2011-09-30 08:43 1881转自:http://tech.ddvip.c ... -
【转】Date类学习总结(Calendar Date 字符串 相互转换 格式化)
2011-08-18 20:09 859Date类学习总结 1.计算某一月份的最大天数 Ca ... -
BigDecimal设置精度
2011-06-17 09:16 12812public BigDecimal setScale ... -
DecimalFormat用法 数字类型文本格式转化
2011-05-18 22:38 2332//String custom="#,###,00& ... -
【转】Java中颜色的String和Color对象之间的互相转换
2011-05-06 13:18 2541package org.signsmile; impor ... -
@incolue org.apache.jasper.JasperException处理
2011-05-05 13:15 898在jsp中 使用include 可能发生以下异常: org. ... -
org.apache.commons.collections.MultiMap 使用范例
2011-04-23 09:15 1751MultiMap map = new MultiValueM ... -
JAVA数字格式化
2011-04-22 09:44 843java.text.DecimalFormat df = ne ... -
Java泛型使用
2011-04-22 09:22 761// IBean为基类 TestBean为子类 /** ...
相关推荐
commons-lang3.3.1.jar、Apache Commons包中的一个,包含了一些数据类型工具类,是java.lang.*的扩展。必须使用的jar包。为JRE5.0+的更好的版本所提供 Jar文件包含的类: META-INF/MANIFEST.MFMETA-INF/LICENSE....
commons-lang3.3.1.jar、Apache Commons包中的一个,包含了一些数据类型工具类,是java.lang.*的扩展。必须使用的jar包。为JRE5.0+的更好的版本所提供 Jar文件包含的类: META-INF/MANIFEST.MFMETA-INF/LICENSE....
/* 内含 common-lang3.jar commons-lang3-3.9-bin.zip commons-lang3-3.9-src.zip 使用说明.txt*/ public static String getClientIp(HttpServletRequest request) { String ip = request.getHeader("X-...
org.apache.commons.commons-math3:3.6.1
import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods....
org.apache.commons.lang所有包的集合,
org.apache.commons.lang jar包
包含有org.apache.commons.lang3.StringUtils; org.apache.commons.lang3.reflect.FieldUtils等类
Apache Commons Lang资源包,下载解压缩后,可获得api文档,源码,jar包,用于开发
org.apache.commons.lang3.StringUtils.jar,打开是common-lang3.jar文件,以及使用方法,根据使用方法使用即可,绝对可靠
apache.commons.lang3
jar包,官方版本,自测可用
org.apache.commons.lang3_3.1.0.v201403281430.jar 工具类
org.apache.commons相关的所以jar包,包括commons-beanutils-1.8.0-bin.zip;commons-betwixt-0.8.zip;commons-cli-1.1.zip;commons-codec-1.3.zip;commons-collections-3.2.1-bin.zip;commons-digester-1.8.zip...
com.springsource.org.apache.commons.lang
com.springsource.org.apache.commons.pool-sources-1.5.3.jar源码
Maven坐标:org.apache.commons:commons-lang3:3.10; 标签:apache、commons、lang3、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,...
jar包分享,你懂的 com.springsource.org.apache.commons.io-1.4.0.jar
jar包,官方版本,自测可用
Maven坐标:org.apache.commons:commons-lang3:3.12.0; 标签:apache、lang3、commons、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译...