Solved

C#

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

21 Experts available now in Live!

Get 1:1 Help Now