Re: Replace the 1st Character in every word
From: Amar (margelos_at_gmail.com)
Date: 11/19/04
- Next message: James: "Re: Saving Excel OWC data to Web Server"
- Previous message: Steen Tøttrup: "Static variables in httphandlers/httpmodules"
- In reply to: JrMc: "Replace the 1st Character in every word"
- Next in thread: Jeremy Davis: "RE: Replace the 1st Character in every word"
- Messages sorted by: [ date ] [ thread ]
Date: 19 Nov 2004 00:11:54 -0800
Even though i cannot understand you want to do that here is a sample.
string str = "horse";
string newstr = str.Replace(str.Substring(0,1),str.Substring(0,1).ToUpper());
"JrMc" <JrMc@discussions.microsoft.com> wrote in message news:<9E46FBD0-C39F-4C8C-AD61-A1669A62BA38@microsoft.com>...
> I am new to this .net environement. I'm needing to do a simple task - I
> need to read the first character of a word and replace it with an uppercase.
> Example:
>
> "horse" --> change to "Horse"
>
> I can do this on an as/400 using RPG, but cannot figure out the syntax to do
> it in .net with the .substring and .toupper methods.
- Next message: James: "Re: Saving Excel OWC data to Web Server"
- Previous message: Steen Tøttrup: "Static variables in httphandlers/httpmodules"
- In reply to: JrMc: "Replace the 1st Character in every word"
- Next in thread: Jeremy Davis: "RE: Replace the 1st Character in every word"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|