Java TEST!!

ddddd (ddddd)
Write a program that takes a single string as input, and outputs a list of strings it has split the input string into.

The delimiter for splitting the input string is the special "|" character. If you want a "|" character to appear within an output string and not be interpreted as a splitting character, then it must be preceded by the escape character "\". Any character followed by the "\" character will be interpreted literally, and not treated as a special character. In this case, the "\" escape character is thrown away, and the character following it is appended literally to the current output string. So for example, "a|b" would be split as "a", "b" but "a\|b" would not be split and would appear in the output as a single string "a|b".

For example, the following input string


would be split as follows

"abc", "def", "gh|ij\klm"

2002-2-13 -04:00

回到话题: Java TEST!!

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论