Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 794309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:17:38+00:00 2026-05-14T22:17:38+00:00

I am having a string in CSV format. Please see my earlier question Parsing

  • 0

I am having a string in CSV format. Please see my earlier question
Parsing CSV string and binding it to listbox

I can add new values to it by some mechanism. Everything will be same except the new values will have numeric part = 0. Take example
I have this exsiting CSV string

1 , abc.txt , 2 , def.doc , 3 , flyaway.txt

Now by some mechanism i added two more files Superman.txt and Spiderman.txt to the existing string. Now it became

1 , abc.txt , 2 , def.doc , 3 , flyaway.txt, 0, Superman.txt, 0 , Spiderman.txt

What i am doing here is that this csv string is paased into SP where its splitted and inserted to db. So for inserting I have to take the files with numeric part 0 only rest will be omiited .Which will be further then converted into CSV string

Array will look like this

str[0]="1" 
str[1]="abc.txt"
str[2]="2"
str[3]="def.doc "
str[4]="3" 
str[5]="flyaway.txt"
str[6]="0"
str[7]="Superman.txt"
str[8]="0" 
str[9]="Spiderman.txt"

So at last i want to say my input will be

1 , abc.txt , 2 , def.doc , 3 , flyaway.txt, 0, Superman.txt, 0 , Spiderman.txt

Desired Output:

0, Superman.txt, 0 , Spiderman.txt 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:17:39+00:00Added an answer on May 14, 2026 at 10:17 pm

    If your new values are always being added to the end of the input, all you need to do is search the string for the first 0 and then return it and everything after it using string.Substring(Int32).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a major problem with writing values into a new CSV file. I
Im having trouble reading from a CSV file final String DELIMITER = ,; Scanner
Isn't having String enough? Just as an example, why can String class lets you
Having a problem with parsing a CSV file. I connect to the file using
Sometimes I need to parse string that is CSV, but I am having trouble
I have a string in csv format, that I wish to simply open in
I'm having some trouble figuring this out. I have the following CSV string hello
I'm having some trouble parsing a *.CSV file in windows server 2008 64bit version.
I am having an issue while parsing a CSV file. It is only 2
I am having string like String str=<?xml version=1.0 encoding=UTF-8?><head><heading>Appliance Repairs</heading></head><?xml version=1.0 encoding=UTF-8?>Appliance Repairs<?xml version=1.0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.