public void formatList()
{
String temp=this.deleteParenthesis(standValue);
valueList=Tools.string2List(temp, "\\,");
}
/**
* 去除字符串中的括号
* */
public String deleteParenthesis(String standValue)
{
String temp=null;
//去掉字符串中的"("
if(standValue.contains("("))
{
temp=standValue.substring(1);
}
//去掉字符串中的")"
if(standValue.contains(")"))
{
temp=temp.substring(0,temp.length()-1);
}
return temp;
}
public interface RuleCompare
{
boolean compare(String realValue);
}
{
String temp=this.deleteParenthesis(standValue);
valueList=Tools.string2List(temp, "\\,");
}
/**
* 去除字符串中的括号
* */
public String deleteParenthesis(String standValue)
{
String temp=null;
//去掉字符串中的"("
if(standValue.contains("("))
{
temp=standValue.substring(1);
}
//去掉字符串中的")"
if(standValue.contains(")"))
{
temp=temp.substring(0,temp.length()-1);
}
return temp;
}
public interface RuleCompare
{
boolean compare(String realValue);
}
本文介绍了一种用于处理字符串的方法,包括去除括号内的内容并转换为列表的功能。通过定义公共方法和接口,实现了对输入字符串的有效操作。
7126

被折叠的 条评论
为什么被折叠?



