PowerTip: Break a Word into Letters with PowerShell


Summary: Learn how to use Windows PowerShell to break a word into letters.

Hey, Scripting Guy! Question How can I use Windows PowerShell to break a word into letters?

Hey, Scripting Guy! Answer Use the tochararray method, for example:

“dog”.tochararray()

Comments (2)

  1. I reference these resources when I am scripting. Thank you so much

  2. PetSerAl says:

    Since multiple chars can describe single letter, it maybe more appropriate to use [System.Globalization.StringInfo]::GetTextElementEnumerator instead.

Skip to main content