Thank's
Liart Junior (Developer)
----- Original Message -----
From: "Boemio, Neil (CAP, FGI)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 29, 2000 6:58 PM
Subject: RE: Replace
> I use the following:
>
> //
> // replace
> //
> // Replaces every occurrence of oldStr in s with newStr.
> //
> // Parameters:
> // s: The String to perform the replacement on
> // oldStr: The substring to be replaced
> // newStr: The substring to replace with
> //
> public String replace(String s, String oldStr, String newStr)
> {
> int pos = s.indexOf(oldStr);
>
> while (pos != -1) {
> s = s.substring(0, pos) + newStr +
> s.substring(pos + oldStr.length());
> pos = s.indexOf(oldStr, pos + newStr.length());
> }
> return s;
>
> }
>
> > -----Original Message-----
> > From: Liart Junior [SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, May 29, 2000 10:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: Replace
> >
> > I would like to know if someone has a function that I manage to replace
a
> > string for other string.
> > With replace(), I with himself just change a caracter for other. I need
> > replace " ' " for " ' ' ".
> >
> > Thank's
> >
> > Liart Martins
> >
> > Web Developer
> >
> >
==========================================================================
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets