By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,500 Members | 1,571 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,500 IT Pros & Developers. It's quick & easy.

converting to proper case

P: n/a
i'm trying to convert names to their proper case (e.g. "todd" ->
"Todd") using the following rountine:

Private Function ConvertToProperCase(ByVal stringValue As String)
As String
Dim ci As New
System.Globalization.CultureInfo("en-US", False)
Dim properCaseValue As String

properCaseValue = stringValue.Replace("'", "' ")
properCaseValue = ci.TextInfo.ToTitleCase(properCaseValue)
properCaseValue = properCaseValue.Replace("' ", "'")

Return properCaseValue
End Function ' ConvertToProperCase()
it works fine except when the name i pass in is all in upper case (it
remains in upper case). anybody know why or what i am doing wrong? thx
in advance.

Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Because you need to drop it all to lowercase firs


Then it should work.
Jul 21 '05 #2

P: n/a
yes, this works. thx.

every other combination of upper case and lower case letters gets
converted correctly. how illogical...
On Wed, 5 May 2004 22:36:02 -0700, "Jason"
<an*******> wrote:
Because you need to drop it all to lowercase first


Then it should work.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.