$trimmed = rtrim($text);
Deletes whitespace... how does that help me? Read the thread title again.
$trimmed = rtrim($text, " \t.");
There's no explanation for this so I have no clue what it does.
$clean = rtrim($binary, "\0x00..\0x1F");
I doubt this is what I want either.
Some examples. The manual is confusing as hell. That was the first place I looked before I even came here. If it is as simple as you say, why couldn't you just write the one line for me so I can understand. It would be a lot faster to do than that whole paragraph you just gave me.