I would like to insert a soft hyphen between every letter in a word using powershell. 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 powershell?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using .NET methods a little more than canonical PowerShell code, you can write
and Powershell outputs “T-h-i-s-i-s-a-t-e-s-t”
EDIT: For a true soft hyphen, and using this answer on Unicode in PowerShell, I would change the second line to