Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I specify which characters StreamTokenizer treats as token delimiters?

0
Posted

How can I specify which characters StreamTokenizer treats as token delimiters?

0

Location: http://www.jguru.com/faq/view.jsp?EID=241596 Created: Oct 31, 2000 Modified: 2001-08-18 18:29:35.681 Author: Tim Rohaly (http://www.jguru.com/guru/viewbio.jsp?EID=10) Question originally posed by Satish Bhakta (http://www.jguru.com/guru/viewbio.jsp?EID=223736 StreamTokenizer breaks the input stream into tokens using whitespace as a delimiter. By default, Unicode characters \u0000 through \u0020 are considered whitespace. This encompasses things like space, tab, newline, etc. If you want to change this list, you need to invoke the method whitespaceChars(int low, int high); all characters having Unicode values between low and high will be considered whitespace, in addition to the default set. You can call whitespaceChars() any number of times – each invocation will add to the list of whitespace characters. The only way to clear out the list is to set those characters to be something other than whitespace – you might use ordinaryChar(int ch), ordinaryChars(int low, int high), wo

0
10

Location: http://www.jguru.com/faq/view.jsp?EID=241596 Created: Oct 31, 2000 Modified: 2001-08-18 18:29:35.681 Author: Tim Rohaly (http://www.jguru.com/guru/viewbio.jsp?EID=10) Question originally posed by Satish Bhakta (http://www.jguru.com/guru/viewbio.jsp?EID=223736 StreamTokenizer breaks the input stream into tokens using whitespace as a delimiter. By default, Unicode characters \u0000 through \u0020 are considered whitespace. This encompasses things like space, tab, newline, etc. If you want to change this list, you need to invoke the method whitespaceChars(int low, int high); all characters having Unicode values between low and high will be considered whitespace, in addition to the default set. You can call whitespaceChars() any number of times – each invocation will add to the list of whitespace characters. The only way to clear out the list is to set those characters to be something other than whitespace – you might use ordinaryChar(int ch), ordinaryChars(int low, int high), wo

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123