具体根据
java.util.regex.Pattern源,其
String.split(..)使用,
"".split("x"); // returns {""} - valid - when no match is found, return the original string"x".split("x"); // returns {} - valid - trailing empty strings are removed from the resultant array {"", ""}"xa".split("x"); // returns {"", "a"} - valid - only trailing empty strings are removed"ax".split("x"); // returns {"a"} - valid - trailing empty strings are removed from the resultant array {"a", ""}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)