How to remove all punctuation and spaces in a string?
问题 I have input like this: This is, ,,, *&% a ::; demo + String. +Need to**@!/// format:::::!!! this.` Output Required: ThisisademoStringNeedtoformatthis I have to do this without using str_trim. Edit: I am writing an encryption program. I have to remove all punctuation from the string and turn all lower case letters to uppercase before I encrypt it. I added the code. I need to remove the spaces, or any punctuation before I turn it to upper case. So far I haven't found anything in my book that