Yeah, or toUpperCase/toLowerCase.

"Galbreath, Mark" wrote:

> do an equalsIgnoreCase() then....
>
> -----Original Message-----
> From: Erik Morton [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 4:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Endswith()
>
> If I understand your question correctly, you may want to try this:
>
> String url =
> "/data/verity/custom-kb/content/solutions/gold/55.0.13769927.2880318.html";
> String file = url.substring(url.lastIndexOf("/"), url.length());
> if(file.endsWith(".html") || file.endsWith(".HTML")) {
> ///yada yada yada
> }
>
> Now, notice that comparing the last characters of the file string is
> imprecise,
> because in theory a url like http://host.com/myFile.HtMl is valid.
>
> Lance Prais wrote:
>
> > I am new to Programming, Can anyone explain how to use endswith()
> >
> > For example I want to check this field to see what the .filetype is: I can
> > not seem to grasp it with this field:
> >
> > /data/verity/custom-kb/content/solutions/gold/55.0.13769927.2880318.html.
> >
> > Thank you in advance
> > Lance
> >
> >
> ___________________________________________________________________________
> > 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
>
> --
> Erik I Morton
> Developer
> ------------------
> CommerceHub
> http://www.commercehub.com
> 518-886-0704
> 21 Corporate Drive
> Clifton Park, NY 12065
>
> ___________________________________________________________________________
> 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
>
> ___________________________________________________________________________
> 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

--
Erik I Morton
Developer
------------------
CommerceHub
http://www.commercehub.com
518-886-0704
21 Corporate Drive
Clifton Park, NY 12065

___________________________________________________________________________
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