Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- string test = "Danish letters: Æ Ø Å !!!!!!??||~";
- cout << "Test = " << test << endl;
- for(int l = 0;l<test.size();l++)
- {
- if(!isalpha(test.at(l)) && test.at(l) != ' ')
- {
- test.replace(l,1," nope");
- }
- }
- cout << "Test = " << test << endl;
- return 0;
- Test = Danish letters: Æ Ø Å !!!!!!??||~
- Test = Danish letters nope nope nope nope nope nope nope nope nope nope nope nope nope nope nope nope nope nope"
- test.at(l)!='Å'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement