How to remove characters from string value
-
Abhinav S wrote:
string.Rmpty;
Now that is funny. :laugh:
I must get a clever new signature for 2011.
string.Rmpty is perfectly acceptable syntax with the Scooby-Do extensions installed. :-D
I know the language. I've read a book. - _Madmatt
-
Abhinav S wrote:
string.Rmpty;
Now that is funny. :laugh:
I must get a clever new signature for 2011.
Is fixed now.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick
-
I want to remove , and . From string value but i don't know how to do that. I h've such type of string value string
str ="abc, d.e f,g h,i. J,k"
plz help me
Try this.
string str = "abc, d.e f,g h,i. J,k";
str = str.Replace(',', string.Empty).Replace('.', string.Empty); -
you can simply remove , and . from your string value by using Split function. take a look how to display
string str = "abc, d.e f,g h,i. j,k";
string[] arr = str.Split(',', '.'); // remove all , and .
foreach (string str1 in arr)
{
Console.Write(str1); //output abc de fg hi jk
}modified on Monday, January 24, 2011 1:04 AM
I have done Minor changes in my answer
string str = "abc, d.e f,g h,i. j,k";
string[] arr = str.Split(',', '.'); // remove all , and .
str = string.Empty; // Changes here
foreach (string str1 in arr)
{
str += str1;
}
Console.WriteLine(str); //output abc de fg hi jk