🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #478

Re: How to split a String?

#478
From: Vander
Date: Tue, 19 Apr 2005 09:10
18 lines
1336 bytes
csicentury wrote:
> I want to get "14.pdf"  from string "d:\uintapp\search\info\14.pdf",
> but how to implement?
> my jdk is 1.3
> 
> Thanks
> Century
> 
> 

I guess the only cross-platform implementation is

String path = "d:\uintapp\search\info\14.pdf";
String name = new File( path ).getName();

This should return at least an empty string (if path has no filename).

- Vander
Technical Details
Message-ID: <4264cb03$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4264bac7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,9b8a0edae9b6ee0b
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 19 Apr 2005 11:10:20 +0200
From: Vander <874505@gmx.de>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: How to split a String?
References: <4264bac7@newsgroups.borland.com>
In-Reply-To: <4264bac7@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.158.184.113
Message-ID: <4264cb03$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1113901827 193.158.184.113 (19 Apr 2005 02:10:27 -0800)
Lines: 18
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail