Why not just use the `rtrim` function?