I get a string that can have from zero to multiple leading and trailing spaces.
I’m trying to get rid of them without lot of hackery but my code looks huge.
How to do this in a clean way?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
as easy as:
$(echo $src)will get rid of all around spaces.than you simply add how much spaces you need before it.