Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

replace first occurrence of character in string c#

var regex = new Regex(Regex.Escape("o"));
var newText = regex.Replace("Hello World", "Foo", 1);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #replace #occurrence #character #string
ADD COMMENT
Topic
Name
4+9 =