I would like to insert a soft hyphen between every letter in a word using C#. for example here is some text:
Thisisatest => T-h-i-s-i-s-a-t-e-s-t
‘-‘ is a soft hyphen. How might i do this in C#? I am going to use it in website.
Note: I am on .NET 2.0.
Use the HTML entity
­for a soft hyphen:For .NET 2.0:
Or using a
StringBuilder: