为以下内容寻找自定义CSV解析器:3种类型:Int,String,Null
class CustomType{
String s;
int val;
public CustomType(String s){
this.s = s;
val = -1;
}
public CustomType(int v){
val = v;
s = null;
}
}
给定一个字符串,解析它并返回一个自定义类型的列表:
字符串输入示例:
"X", 10, = ["X", 10, null]
, = [null, null]
"Hi, You", 10, 20, = ["Hi, You", 10, 20, null]
"Hi "" You" = ["Hi " You"]
请注意,对于最后一种情况,如果连续有2个引号,则会转义一个并且答案中只显示1个。