S
S
Sergey Panov2018-05-31 12:03:05
C++ / C#
Sergey Panov, 2018-05-31 12:03:05

How to remove a specific character in a string?

Good day. I have a Name variable which contains the value Ivanov .
Please tell me, with the help of which function, I can remove specific characters from a string.
For example, I want to remove 3 characters from a string to make Ivnov .
Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman, 2018-05-31
@select8

string.Remove();
rextester.com/OGNNN21985

N
netrox, 2018-05-31
@netrox

String s = "Ivanov";
Console.WriteLine("The initial string: '{0}'", s);
s = s.Replace("a", "");
Console.WriteLine("The final string: '{0}'", s);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question