How do I extract only alphabets from a string and put them in a different string? Do I need to use isalpha?
How do I extract only alphabets from a string and put them in a different string? Do I need to use isalpha?
Yes, isalpha(), that'd be a good start . Have a go and post here with some code if you run into trouble.Originally posted by NavyBlue
How do I extract only alphabets from a string and put them in a different string? Do I need to use isalpha?
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
How would I use isalpha? In a loop? I don't where to start with using isalpha to extract alphabets from a string.
isalpha
Loop through each character in the array, testing it with isalpha(). If the result is true, copy that one character to another array.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]