Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

replace index in string c#

using System.Text;
var theString = "ABCDEF";
var sb = new StringBuilder(theString);
sb[2] = "r" //replace letter at index 2 with "r"
theString = sb.ToString(); //theString: "ABrDEF"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #replace #index #string
ADD COMMENT
Topic
Name
3+3 =