首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

串匹配:依据前缀和后缀确定目标子串

2012-11-15 
串匹配:根据前缀和后缀确定目标子串这样就行: String str prefix + keyword + postfix //如prefix +

串匹配:根据前缀和后缀确定目标子串

这样就行: 

String str = prefix + keyword + postfix; //如"prefix" + "Keyword" + "Postfix"return str.substring(prefix.length(), str.indexOf(postfix)); //"Keyword"

热点排行