Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# insert character into string at position

//Insert method returns a copy, it does not alter the string since strings are immutable
string str = "abc";
str = str.Insert(2, "XYZ"); //str == "abXYZc"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #insert #character #string #position
ADD COMMENT
Topic
Name
8+2 =