Solved

C#

Posted on 2012-03-18
3
269 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now