Solved

C#

Posted on 2012-03-18
3
270 Views
Last Modified: 2012-03-23
Create a script that takes text that a user enters into a form and converts it to the title case capitalization.  To accomplish this, use the Split() method to split the words in the string into an indexed array.  Then, create a for loop that uses another split() method that splits each word in the elements of the indexed array into another indexed array of characters.  Within the for loop, use the ToUpper() method to convert the first element in the second array (which represents the first character in the word to uppercase) to uppercase, and then use the Join() method to rebuild the array of words in the text string.  Execute a final Join() method to convert the array of words back into a single text string.  Save the project as TitleCase.
0
Comment
Question by:assaultkitty
3 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 37736487
For your information: The general conclusion among the experts is to give guidance but not to actually do the homework for the person.  The purpose of homework is for them to learn how to program and if an experts does it for them, they are not learning how to do it for themselves.
(comment from http://www.experts-exchange.com/Community_Support/General/Q_10154559.html)


For your problem, take a look at
Capitalize the First Letter of a Word in C#
http://digitalcolony.com/2007/06/capitalize-the-first-letter-of-a-word-in-c/
0
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37736514
Going by the policies of EE, try doing it yourself,
however here is a method that does it for you:-

As far as your problem in concerned, try doing it yourself:-

string asTitleCase =
   TextInfo.ToTitleCase(myText.ToLower());

Open in new window

0
 

Author Closing Comment

by:assaultkitty
ID: 37759885
This was a good start for me.  I appreciate your guidance.  Stay tune.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question