public static string FirstLetterCapital(string strData) { string strReturn = string.Empty; strReturn = strData[0].ToString().ToUpper(); for (int i = 1; i < strData.Length; i++) { strReturn += strData[i].ToString().ToLower(); if (strData[i] == ' ' && (i+1) < strData.Length ) // { strReturn += strData[i + 1].ToString().ToUpper(); i++; } } return strReturn; } Input: WINDOWS FORMS PROGRAMMING Output: Windows Forms Programming
1 comments:
Its Nice And Good...But It Has A Bug When We Want To Insert/Type A Letter Or Word In Between The Typed Word.Then The Cursor Control Is Always Jumps To End Of The Word..
Post a Comment