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
Post a Comment