Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > string manipulation

Reply
Thread Tools

string manipulation

 
 
Eugene Anthony
Guest
Posts: n/a
 
      04-06-2007
Path:


images/5/Video1/qbert.flv


How do I retrieve images/5/Video1/ from

images/5/Video1/qbert.flv. This path

images/5/Video1/ can be different as in

Video1....Video100 and so on. I know that

we can use substring but the problem is

specifying the end position for retrieval.


How is it done?


Eugene Anthony

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Morten Wennevik [C# MVP]
Guest
Posts: n/a
 
      04-06-2007
Hi Eugene,

Try using Path.GetDirectory(path). You'll end up with images\5\Video1, so if you want images/5/Video1/ you will have to string.Replace \ with / and add a / at the end as well.

--
Happy coding!
Morten Wennevik [C# MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
String manipulation Chris ASP .Net 1 05-24-2004 02:19 PM
Advanced String Manipulation (C#) Aaron ASP .Net 2 01-02-2004 06:50 PM
String Manipulation Aaron ASP .Net 3 12-31-2003 03:39 PM
Perl string manipulation jared in ecs Perl 2 10-22-2003 05:36 PM
String Array Manipulation Problem Garfield ASP .Net 5 08-27-2003 10:07 PM



Advertisments