?
Solved

C#

Posted on 2012-03-18
3
Medium Priority
?
275 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

765 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