471,325 Members | 1,591 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

Replace, Left, Right functions in C#

Hi,

Does C# has functions such as replace, left, right, substring for strings?
Without these functions, it's not easy to process strings.

TIA
Jan 19 '06 #1
3 6370
Me
The String class has those methods.

Ex.)

String a = "hello";
a.Substring();
a.Remove();
a.Trim();
a.TrimEnd();
a.TrimStart();
a.ToUpper();

You get the idea.
"Ed Chiu" <Ed****@discussions.microsoft.com> wrote in message
news:76**********************************@microsof t.com...
Hi,

Does C# has functions such as replace, left, right, substring for strings?
Without these functions, it's not easy to process strings.

TIA

Jan 19 '06 #2
Here is a link to the MSDN documentation for the String class:

http://msdn.microsoft.com/library/de...classtopic.asp

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ed Chiu" wrote:
Hi,

Does C# has functions such as replace, left, right, substring for strings?
Without these functions, it's not easy to process strings.

TIA

Jan 19 '06 #3
On Thu, 19 Jan 2006 13:06:16 -0500, "Me" <me@home.com> wrote:
The String class has those methods.

Ex.)

String a = "hello";
a.Substring();
a.Remove();
a.Trim();
a.TrimEnd();
a.TrimStart();
a.ToUpper();

Plus
if(a.StartsWith("he"))
{
// dosomthing
}
etc...
a.EndsWith("lo");
Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
Jan 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

22 posts views Thread by Michael Nahas | last post: by
11 posts views Thread by Bruce A. Julseth | last post: by
19 posts views Thread by gk245 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.