here is a usage scenario where split() seems not to work
Expand|Select|Wrap|Line Numbers
- String origAVNListStr = "~`L~`L~`L~`~`~`L~`";
- String[] strArr = origAVNListStr.split("~`");
- for(int i=0;i<strArr.length;i++)
- {
- System.out.println(i+1 +"the next token - " + strArr[i]);
- }
Expand|Select|Wrap|Line Numbers
- 1the next token -
- 2the next token - L
- 3the next token - L
- 4the next token - L
- 5the next token -
- 6the next token -
- 7the next token - L
[HTML]8the next token -[/HTML] is not displayed.
As far as this space reading from the string in an Array is concerned StringTokenizer fails even miserably. It will not take any of the spaces(either at the start/end or in between)
Is there any way out of it. Sincere thanks in advance.