Sorry, I've wirtten to you ("\\","/"), but tested ('\\','/').
And in case of String.length(), I've tested with this String:
M:\\Intranets\\Unv\\pruebas\\RITA\\rita\\Proyectos
and got: 50, when I expected to get: 44
I'm using JSDK 1.4
Thanks, Bye.
----- Missatge Original -----
De: GW <[EMAIL PROTECTED]>
Data: Divendres, Juny 21, 2002 1:40 pm
Assumpte: Re: String.length --- MayBe offtopic.
> I've tested your theory and I seem to get 6 and not 7.
> try str = str.replace('\\','/')
> instead of ("\\","/")
> check out java.lang.String.replace(char c, String s)
>
> ----- Original Message -----
> From: "Clemente Dani" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 21, 2002 1:14 PM
> Subject: String.length --- MayBe offtopic.
>
>
> Hi all, maybe this can be considered as a offtopic, but As all we are
> Java programmers, I think it could be interesting.
>
>
> Do any of you know why the method String.length(), counts caracter
> scape such "\\" as of there were two characaters? I mean:
>
> String str = "d:\\myf"
> str.length() ---> returns 7
>
> and if you try to replace "\\" with "/" using the replace method:
>
> str = str.replace("\\","/");
>
> it results in str ----> "d://myf"
>
>
> Any idea?
>
> Thanks.
>
> bye, Dani
>
>
> __________________________________________________________________
> �Quieres conocer todo sobre el mundial?�Quieres que lleguen los goles
> de Espa�a a tu m�vil?�Quieres ganar equipaciones de la selecci�n?
> �Quieres que suene el himno nacional en tu m�vil?�Quieres animar a la
> selecci�n y que tu mensaje lo vean miles de personas? Ahora, todo
esto
> y mucho m�s en http://mundial2002.vizzavi.es/
>
> =========================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
>
>
=======================================================================
====
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-
> INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
>
__________________________________________________________________
�Quieres conocer todo sobre el mundial?�Quieres que lleguen los goles
de Espa�a a tu m�vil?�Quieres ganar equipaciones de la selecci�n?
�Quieres que suene el himno nacional en tu m�vil?�Quieres animar a la
selecci�n y que tu mensaje lo vean miles de personas? Ahora, todo esto
y mucho m�s en http://mundial2002.vizzavi.es/
==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com