When tokenizing a string, the delimiters are ignored by default.
Tutorial Details:
Purpose
When tokenizing a string, the delimiters are ignored by default. However, it may be useful to get them returned as tokens too. Each delimiter will be returned as a one-character string.
Constructor
Specify that you want the delimiters returned by specifying true in the third parameter of the constructor.
StringTokenizer st = new StringTokenizer(s, d, true);
Creates a StringTokenizer for the String s using delimiters from the String d
Rate Tutorial: http://www.roseindia.net/java/java-tips/data/strings/55stringTokenizer/20stringtokdelim.shtml
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: Tokenizing Delimiters
View Tutorial: Tokenizing Delimiters
Related
Tutorials:
|