473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

C# String Manipulation

Does anyone know of a concise article that covers string manipulation, such
as insert, join, pad, etc.
Thanks,
Jim
Nov 15 '05 #1
4 4839
Jim McGivney <mc******@nospam.winid.com> wrote:
Does anyone know of a concise article that covers string manipulation, such
as insert, join, pad, etc.


I don't, but the basics are:

o Strings themselves are immutable. All the operations such as
Substring, PadLeft, PadRight etc return a reference to a *new* string
with the appropriate data in.

o To avoid making multiple copies of data, if you're doing lots of
operations without needing the intermediate results as strings,
consider using a StringBuilder.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
I'd start here in the MSDN documentation:
http://msdn.microsoft.com/library/de...classtopic.asp
Peter

"Jim McGivney" <mc******@nospam.winid.com> wrote in message
news:er**************@TK2MSFTNGP09.phx.gbl...
Does anyone know of a concise article that covers string manipulation, such as insert, join, pad, etc.
Thanks,
Jim

Nov 15 '05 #3
Here's a good book on it, apparently out of print already, but still
available used:

http://www.amazon.com/exec/obidos/AS...vingtoninnovat

Nov 15 '05 #4
Jim,
Charles Petzold's book "Programming Microsoft Windows with Microsoft Visual
Basic .NET" from MS Press, has an appendix on Strings and an appendix on
Streams that I find to be good concise articles on Strings & Streams.

There is a C# version of the above book available, I would expect the same
appendixes.

Hope this helps
Jay

"Jim McGivney" <mc******@nospam.winid.com> wrote in message
news:er**************@TK2MSFTNGP09.phx.gbl...
Does anyone know of a concise article that covers string manipulation, such as insert, join, pad, etc.
Thanks,
Jim

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dim | last post by:
I found that C# has some buggy ways to process string across methods. I have a class with on global string var and a method where i add / remove from this string Consider it a buffer... with some...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
29
by: zoro | last post by:
Hi, I am new to C#, coming from Delphi. In Delphi, I am using a 3rd party string handling library that includes some very useful string functions, in particular I'm interested in BEFORE (return...
4
by: WaterWalk | last post by:
Hello, I'm currently learning string manipulation. I'm curious about what is the favored way for string manipulation in C, expecially when strings contain non-ASCII characters. For example, if...
10
by: micklee74 | last post by:
hi if i have a some lines like this a ) "here is first string" b ) "here is string2" c ) "here is string3" When i specify i only want to print the lines that contains "string" ie the first...
5
by: Niyazi | last post by:
Hi, Does anyone knows any good code for string manipulation similar to RegularExpresion? I might get a value as string in a different format. Example: 20/02/2006 or 20,02,2006 or ...
3
by: crprajan | last post by:
String Manipulation: Given a string like “This is a string”, I want to remove all single characters( alphabets and numerals) like (a, b, 1, 2, .. ) . So the output of the string will be “This is...
7
Frinavale
by: Frinavale | last post by:
I currently have a .NET application that has an object which passes a string (a connection string) as a parameter to another object that does database manipulation. This string isn't stored...
3
by: frankeljw | last post by:
I have 2 Java strings 1st String is a series of names, colons, and numbers ie) Name1:13:Name2:4526:Name3:789:Name4:3729:Name5:6:Name6:44 2nd String is a name ie) Name2 I need to get the...
22
by: mann_mathann | last post by:
can anyone tell me a solution: i cannot use the features in standard c++ string classgh i included the string.h file but still its not working.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.