Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: splitting a CSV line in half

Reply
Thread Tools

Re: splitting a CSV line in half

 
 
Roedy Green
Guest
Posts: n/a
 
      05-07-2008
On Wed, 07 May 2008 09:52:55 -0400, Rex Mottram <> wrote,
quoted or indirectly quoted someone who said :

>. Can anyone suggest a
>more elegant technique?


you could scan for , incrementing on each hit. When you find n, split
the string it two with substr + substr.. That would be fast, straight
forward, but perhaps not quite as terse as your current solution.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
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
comparing the first half of a string to the second half joe chesak Ruby 7 09-23-2010 03:34 AM
ie7 displaying only half of page (cuts page in half)... trint ASP .Net 4 09-11-2007 10:56 AM
Splitting a CSV file into 40,000 line chunks Drew Olson Ruby 33 12-02-2006 01:06 AM
regexp that matches half then conditionally excludes the other half Mike Ballard Perl Misc 6 11-15-2005 03:26 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57