By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,104 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

how to remove spaces and special characters in a string using isalpha?

P: 8
Wondering how to take a string and remove special characters and spaces.

Example: how are you?
would be: howareyou
Sep 21 '18 #1

✓ answered by donbock

You should decide whether you want to copy a space-removed version of the input string into a new output string or if you want to modify the input string itself.

Either approach can be legitimate, but the way you solve the problem will be different.

Share this Question
Share on Google+
2 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
Call isalpha on each characters of your string and if isalpha returns true,then append the character to your new string.


I can help you correct code you have written but I cannot write the code for you.
Sep 23 '18 #2

Expert 100+
P: 2,398
You should decide whether you want to copy a space-removed version of the input string into a new output string or if you want to modify the input string itself.

Either approach can be legitimate, but the way you solve the problem will be different.
Sep 27 '18 #3

Post your reply

Sign in to post your reply or Sign up for a free account.