c# - Replace SOH character in string -


i reading small msword document , storing contents in string.

there soh special characters included in string. replace them placeholder string, "#placeholder1" before written new text (.txt) file. note not wanting modify/edit msword document

i'm not sure if string.replace suit or if need go different route. may parameter using soh character.

suggestions?

there's no reason why you're doing shouldn't work. here's minimal example can test on ideone:

using system; public class test {     public static void main()     {         string s = "\u0001 test \u0001";         s = s.replace("\u0001","yay!");         console.writeline(s);     } } 

the other thing can think might doing wrong, not storing result of call replace.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -