Proper Case

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9l?=, Feb 6, 2006.

  1. Hello All:

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

    TIA,
    --
    Joe
     
    =?Utf-8?B?Sm9l?=, Feb 6, 2006
    #1
    1. Advertising

  2. Hello Joe,

    There is an VbStrConv.ProperCase under the StrConv function which would seem
    to be a pretty simple way to do the conversion.

    --
    enjoy - brians
    http://www.limbertech.com


    "Joe" wrote:

    > Hello All:
    >
    > Deos anyone know of a simple way to convert a string to proper case?
    >
    > TIA,
    > --
    > Joe
     
    =?Utf-8?B?YnJpYW5zW01DU0Rd?=, Feb 6, 2006
    #2
    1. Advertising

  3. 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);


    --
    brians
    http://www.limbertech.com


    "Joe" wrote:

    > Brian,
    >
    > Is it possible to do this w/o referring back to VB6 functions?
    >
    > --
    > Joe
    >
    >
    > "brians[MCSD]" wrote:
    >
    > > Hello Joe,
    > >
    > > There is an VbStrConv.ProperCase under the StrConv function which would seem
    > > to be a pretty simple way to do the conversion.
    > >
    > > --
    > > enjoy - brians
    > > http://www.limbertech.com
    > >
    > >
    > > "Joe" wrote:
    > >
    > > > Hello All:
    > > >
    > > > Deos anyone know of a simple way to convert a string to proper case?
    > > >
    > > > TIA,
    > > > --
    > > > Joe
     
    =?Utf-8?B?YnJpYW5zW01DU0Rd?=, Feb 6, 2006
    #3
  4. 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).
    --
    Joe


    "brians[MCSD]" wrote:

    > 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);
    >
    >
    > --
    > brians
    > http://www.limbertech.com
    >
    >
    > "Joe" wrote:
    >
    > > Brian,
    > >
    > > Is it possible to do this w/o referring back to VB6 functions?
    > >
    > > --
    > > Joe
    > >
    > >
    > > "brians[MCSD]" wrote:
    > >
    > > > Hello Joe,
    > > >
    > > > There is an VbStrConv.ProperCase under the StrConv function which would seem
    > > > to be a pretty simple way to do the conversion.
    > > >
    > > > --
    > > > enjoy - brians
    > > > http://www.limbertech.com
    > > >
    > > >
    > > > "Joe" wrote:
    > > >
    > > > > Hello All:
    > > > >
    > > > > Deos anyone know of a simple way to convert a string to proper case?
    > > > >
    > > > > TIA,
    > > > > --
    > > > > Joe
     
    =?Utf-8?B?Sm9l?=, Feb 7, 2006
    #4
  5. Joe - You might want to take a look at this function. It considers names
    like McDonald and O'Connor. You can also add your own exceptions.

    http://www.hutchrick.com/propname.htm


    "Joe" wrote:

    > 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).
    > --
    > Joe
    >
    >
    > "brians[MCSD]" wrote:
    >
    > > 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);
    > >
    > >
    > > --
    > > brians
    > > http://www.limbertech.com
    > >
    > >
    > > "Joe" wrote:
    > >
    > > > Brian,
    > > >
    > > > Is it possible to do this w/o referring back to VB6 functions?
    > > >
    > > > --
    > > > Joe
    > > >
    > > >
    > > > "brians[MCSD]" wrote:
    > > >
    > > > > Hello Joe,
    > > > >
    > > > > There is an VbStrConv.ProperCase under the StrConv function which would seem
    > > > > to be a pretty simple way to do the conversion.
    > > > >
    > > > > --
    > > > > enjoy - brians
    > > > > http://www.limbertech.com
    > > > >
    > > > >
    > > > > "Joe" wrote:
    > > > >
    > > > > > Hello All:
    > > > > >
    > > > > > Deos anyone know of a simple way to convert a string to proper case?
    > > > > >
    > > > > > TIA,
    > > > > > --
    > > > > > Joe
     
    =?Utf-8?B?VEg=?=, Feb 9, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. THY
    Replies:
    4
    Views:
    643
    Oliver
    Oct 25, 2003
  2. =?Utf-8?B?Sm9l?=

    RE: Proper Case

    =?Utf-8?B?Sm9l?=, Feb 6, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    463
    =?Utf-8?B?Sm9l?=
    Feb 6, 2006
  3. Guest
    Replies:
    1
    Views:
    730
    Ken Cox [Microsoft MVP]
    Dec 25, 2004
  4. CD
    Replies:
    2
    Views:
    164
  5. Ruby Quiz

    [QUIZ] Proper Case (#89)

    Ruby Quiz, Aug 4, 2006, in forum: Ruby
    Replies:
    24
    Views:
    300
    Mitchell Koch
    Aug 10, 2006
Loading...

Share This Page