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" ) ;

Guy

Sam Rose wrote:

> Hello all,
>
> One of my servlet's receives a parameter in the form of a string, is
> there anyway I can search this string and find if there are any spaces
> in it?
> And if so is there anyway of changing the space with a plus sign?
>
> Cheers
>
> ___________________________________________________________________________
> 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
begin:vcard
n:Nirpaz;Guy
tel;work:MultiConn Internatilnal
x-mozilla-html:FALSE
org:MultiConn International
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Software Developer
fn:Guy Nirpaz
end:vcard

Reply via email to