我需要一个 2 类型字符串的if 条件:
1) "/A/Ababa"
2) "/A"
像这样的东西:
if(myString is of the first type){
must return Ababa
}
然后
if(myString is of the second type){
must return null
我该怎么做才能正确?也许正则表达式?子串?还有其他想法吗?
眼眸繁星
相关分类