use java.lang.String method replace(char oldChar, char newChar);
i.e. String modified = new String("asd dfsfd  fff ").replace(" ", "+" );
modified string should be "asd+dfsfd+fff"

Andriux
hope this is what u were asking for :)

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

--
Andrius Juozapaitis
Programmer, No Magic
Kaunas, Lithuania
Cell: +370-8534598
WWW: http://www.nomagic.com

___________________________________________________________________________
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