Re: Interating over the characters in a string
From: Carlo Razzeto (crazzeto_at_hotmail.com)
Date: 09/24/04
- Next message: bruce barker: "Re: Scraping data from a web form submit"
- Previous message: Brent: "Scraping data from a web form submit"
- In reply to: Jon Skeet [C# MVP]: "Re: Interating over the characters in a string"
- Next in thread: Jon Skeet [C# MVP]: "Re: Interating over the characters in a string"
- Reply: Jon Skeet [C# MVP]: "Re: Interating over the characters in a string"
- Reply: Nick Malik: "Re: Interating over the characters in a string"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 24 Sep 2004 13:24:06 -0400
"Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message
news:MPG.1bbcd392eb51b3598b4d9@msnews.microsoft.com...
>
> Although Unicode (UTF-16 in particular) allows surrogate pairs, I don't
> think that's the real problem. What exactly are you seeing?
>
> Note that your code as posted above will remove the character *before*
> the final " as well.
>
> --
> Jon Skeet - <skeet@pobox.com>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too
CSV Example:
12345,"Some, Text",9/18/2003
Array Values:
array[0]=>12345
array[1]=>"Some, Text"
array[2]=>"9/18/2003
The challenge, remove the " character from the begining and end of the
string ( not using string.replace() ). What doesn't seem to work:
if ( array[1][0] == '"' ) {
array[1] = array[1].Substring( 1, array[1].length - 1 );
}
if( array[1][( array[1].length - 1 )] == '"' ) {
array[1] = array[1].Substring( 0, array[1].length - 2 );
}
- Next message: bruce barker: "Re: Scraping data from a web form submit"
- Previous message: Brent: "Scraping data from a web form submit"
- In reply to: Jon Skeet [C# MVP]: "Re: Interating over the characters in a string"
- Next in thread: Jon Skeet [C# MVP]: "Re: Interating over the characters in a string"
- Reply: Jon Skeet [C# MVP]: "Re: Interating over the characters in a string"
- Reply: Nick Malik: "Re: Interating over the characters in a string"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|