Re: regex
- From: "Kevin Spencer" <unclechutney@xxxxxxxxxxxx>
- Date: Thu, 9 Aug 2007 07:19:06 -0400
Hi Jon,
I suppose pedantry has its place. These details are always useful to know.
In my case, I was simply talking about looping through the characters in the
string as an efficient way of counting the occurrences of a character.
However, it might have led to someone getting the wrong impression
concerning what ways one might be able to treat a string as if it were an
array of char. So, I don't take offense. I do think my solution was probably
the most efficient method for achieving the OP's goal, though. I hope that
the original problem has been solved.
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message
news:1186572194.199261.325440@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 8, 12:17 pm, "Kevin Spencer" <unclechut...@xxxxxxxxxxxx> wrote:
Correct as usual, Jon. I should have said "a string encapsulates an array
of
char, and can be treated just like one."
I think I'd still have quibbled: internally there isn't an array of
chars (unlike in Java, for instance) and you can't treat it as an
array of chars because you can always modify the contents of arrays,
whereas the string indexer is readonly.
There's always room for pedantry :)
Jon
.
- References:
- Prev by Date: WCF Service or hosting in Windows 2000
- Next by Date: Re: InvalidOperationOperationException problem
- Previous by thread: Re: regex
- Next by thread: Re: Accessing office addins...
- Index(es):
Relevant Pages
|