VBOfficer Posted March 18, 2009 Posted March 18, 2009 Hi, How can I convert the first letter of each word in a sentence to upper case? I cannot simply use .ToUpper because some words like "of" shouldn't be converted. Is there an internal function in VB.NET FW2 which do it for me automatically? Capitalization I mean. Thanks :) Quote
Administrators PlausiblyDamp Posted March 18, 2009 Administrators Posted March 18, 2009 The only one I am aware of is System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase This will case according to your culture's rules but I don't think it special cases words like 'of' etc. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
stumper66 Posted March 19, 2009 Posted March 19, 2009 I would just follow the above suggestion, and maybe have it search for any exempt words, and call .ToLower on those. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.