A couple of days ago, I was running some unit tests across a piece of PowerShell code for work and a test was failing where I didn’t expect it to.
After realising that the issue was with the workings of
TrimEndand my thoughts on how
TrimEndworks (versus how it actually works), I wondered if it was just me being a bit stupid.
So I put a poll up on Twitter, and I’m not alone! 60% of the people answering the poll had the wrong idea as well.
The way that works is…not what I would have expected.