I sort of brushed over it on my last post but this is how you reverse a string.
The code is at https://github.com/RichardSiddaway/Blogcode/blob/master/stringtechniques.ps1
Take the input string and turn it into an array of chars. Use the reverse static method of the array class to reverse the array. Other useful array methods can be found in the documentation – https://docs.microsoft.com/en-us/dotnet/api/system.array?redirectedfrom=MSDN&view=netframework-4.7.2
-Join is used to stitch the reversed char array back into a string.