I'm ultimately looking to create a service that will allow me to count all selected non-whitespace characters. To get there though, I'm looking for a way to remove all whitespace characters from a string in a service that I can then use for other such purposes. For example, I mainly want to use it to get quick DNA coordinates while looking at output in Terminal.app, but I can think of other uses, like counting code characters.
I have found applescripts to remove spaces, but nothing I've found appears to account for tabs, newline characters, carriage returns, or any other strange or weird character that doesn't display.
Note: I don't want to create a file or use or change the clipboard.
Side-question: Is there a way to display the result (briefly) in a bezel, like the way you can display phone numbers from the Contacts app?