So, I was getting down and dirty with some MS SQL today.
Loving it - standard. Aside from some basic string manipulation which I begrudgingly decided to leave out from the client code the procedure was quite straight-forward. Anyway, I wanted to determine the last character of a string and came across some odd LEN behaviour illustrated as follows:

Returns:

Right?
Wrong! You get:

So LEN ignores trailing spaces. I know it says as much, and very clearly, in the documentation but who would have expected that...?