Solved

C#

Posted on 2012-03-18
3
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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.…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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