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
AdPosted Oct 18, 2004, 1:50 PM
robin 0Posted Oct 18, 2004, 2:00 AM
bilnaadPosted Oct 17, 2004, 8:57 PM
AdPosted Oct 17, 2004, 8:39 PM
MykoninePosted Oct 17, 2004, 6:50 PM
AdPosted Oct 17, 2004, 6:45 PM
shimtannyPosted Oct 17, 2004, 4:05 AM