Hi,
Does C# has functions such as replace, left, right, substring for strings?
Without these functions, it's not easy to process strings.
TIA 3 6452
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Pikkel |
last post by:
i'm looking for a way to replace special characters with characters
without accents, cedilles, etc.
|
by: Ermi |
last post by:
Hi,
i have this problem....
From a visual basic application I must replace the value contained in a
column with another one....for example
Field1
------
Alfa
Beta
Gamma
|
by: Michael Nahas |
last post by:
Antti & all interested,
The draft description of my language to replace C is available at:
http://nahas.is-a-geek.com/~mike/MyC.pdf
I am a long time C programmer (I read the old testament...
|
by: cloudx |
last post by:
Hi there,
Here is the line of VB code and I would like to translate into C#, please
help! Thanks!
sMsgIntHeader = (Replace(Replace(Trim(Left(sErrorMsg, InStr(5, sErrorMsg,
vbCrLf))), vbLf,...
|
by: Bruce A. Julseth |
last post by:
I have:
If (Microsoft.VisualBasic.Left(TextBox1.Text, 1) = "$") Then
TextBox1.Text = Microsoft.VisualBasic.Right(TextBox1.Text,
TextBox1.Text.Length - 1)
End If
Adding: Imports...
| |
by: gk245 |
last post by:
I have something like this:
printf("Enter numbers: ");
scanf ("%i", &number);
If the user put in a bunch of numbers (like 4568), instead of just one
number, i know that you can extract the...
|
by: sql guy123 |
last post by:
I normally use MS ACCESS vs MS SQL,, which has a left() and right()
function. I need to use MS SQL for this project but I am not familiar
with it. I have read a few books, but can not figure out...
|
by: MP |
last post by:
Hi
trying to begin to learn database using vb6, ado/adox, mdb format, sql
(not using access...just mdb format via ado)
i need to group the values of multiple fields
- get their possible...
|
by: Scott Price |
last post by:
Hello again good folks!
MS Access 2003, WinXP SP2
This time I'm having a trouble with the logic required to search a text box for one of three particular strings ("degrees", "degree" and/or...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |