>You can use the java.utils.StringTokenizer like that
>
>String myString ;
>StringTokenizer st = new StringTokenizer ( myString , " " ) ;
>if ( st.hasMoreTokens () ) System.out.println ( "There are spaces" ) ;


Besides the fact that are much cheaper ways of detecting this
(String.indexOf (..)
for example),  the StringTokenizer won't help you here is there are no
spaces
in your String. No spaces will mean one token, which your ''if" wil consider
like
if there spaces.

AH

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to