Manipulating a string
Hi,
I was wondering if anyone knows how I could change a few things in a string. Say something returns a string like "a table" or "a chair". How can I remove the a and capatalize the t or c so it comes out like this:
"Table" or "Chair".
I've tried to remove the first to bits of the string by doing str.Remove(0, 2). After that, i've tried using ToCharArray() and doing this:
char[] stra = str.ToCharArray();
then
stra[0].ToUpper();
Although this doesn't work. After i've made it look like Table or Chair I need to return a string not char[] or char. I'm am very new to C# and this is my first bit of string manipulation, sorry if i've gone way off the track here.
Thanks for any help.
gordy

shimtannyRank #3,312 · 434 reputationPosted Oct 17, 2004, 12:05 AM EDT
Ad9 reputationPosted Oct 17, 2004, 2:45 PM EDT
MykonineRank #2,671 · 521 reputationPosted Oct 17, 2004, 2:50 PM EDT
Ad9 reputationPosted Oct 17, 2004, 4:39 PM EDT
bilnaadRank #2,169 · 655 reputationPosted Oct 17, 2004, 4:57 PM EDT
robin 0186 reputationPosted Oct 17, 2004, 10:00 PM EDT
Ad9 reputationPosted Oct 18, 2004, 9:50 AM EDT