Re: ToUpper() Better solution
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Thu, 1 Mar 2007 13:27:45 -0000
Ornette <abstrait...nospam...@xxxxxxx> wrote:
So how would you do ?
The mapping table idea you had before looked best to me, although I
wouldn't quite implement it the same way. I'd have a look up table for
every possible character, where it defaults to the Unicode character,
but for all the accented characters you care about, you specify the
non-accented version.
You'd then call ToCharArray() on the string in question, go through
each character replacing the original with the mapped character, and
then create a new string with the char array.
It does require you to manually map all the accented characters you
care about though.
My guess is that there are libraries around to do this somewhere, but I
don't know of any myself.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: ToUpper() Better solution
- From: Chris Mullins [MVP]
- Re: ToUpper() Better solution
- From: Ornette
- Re: ToUpper() Better solution
- References:
- ToUpper()
- From: Ornette
- Re: ToUpper()
- From: Ornette
- Re: ToUpper() Better solution
- From: Ornette
- Re: ToUpper() Better solution
- From: Jon Skeet [C# MVP]
- ToUpper()
- Prev by Date: Re: No Immediate window in VS2006
- Next by Date: Re: .NET Naming Guidelines (C#)
- Previous by thread: Re: ToUpper() Better solution
- Next by thread: Re: ToUpper() Better solution
- Index(es):
Relevant Pages
|
Loading