I am intern learning tons about the industry outside of academia.
One thing I thought about today was trimming input.
On one side of the coin I don't want the user/implementer to constantly receive unexpected results because their input had too many spaces, thus I need to constantly trim user input after every function call.
But at the same time If I am creating a API library for internal use here at the office trailing/leading whitespace may be crucial to the results.
Then there are instances were I am not sure if whitespace will be important or not.
The big issue for me is that I find myself CONSTANTLY calling .trim() everywhere in my code.
Does anyone have any tips/ rules of thumb or just thoughts on how to handle certain situations?