+ 2
Find character and remove the character.
How to find 1 character like (. ) in 100 text file and remove it in c#
5 Réponses
+ 1
c# has regular expressions?
+ 1
why you can't use them in replace method/function?
+ 1
You can use stringName.indexOf('.') to find the first occurrence of '.' in you string and use that position in the next command.
string.Remove(position,number of characters to remove)
In c# a string is an array of chars so you can access individual characters with an index (just like you do with an array). For example in a word "Code" you can access letter "d" by writing word[2]. Keep in mind that the indexing starts from 0.
If you want to remove a character on 100th position use stringName.Remove(100,1);
+ 1
With regex would looks like -> /\./g then replace the match by nothing.
0
Yes