Proper Case

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All:

Deos anyone know of a simple way to convert a string to proper case?

TIA,
 
Hello Joe,

There is an VbStrConv.ProperCase under the StrConv function which would seem
to be a pretty simple way to do the conversion.
 
I found this on Rich Strahl's website:
http://west-wind.com/weblog/posts/361.aspx.

Converts string to ProperCase in a culture sensitive manner. Seems to be
just what you need:

TextBox1.Text =
System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(TextBox1.Text);
 
Brian,

Thanks. I tried that eysterday, too. It works fine except it doesn't
handle things like McDonald or O'Connor. Could I have mised something in the
implementation? I use the exact code that you incldued in your last post
(from Rich's website).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top