Advertisement
Guest User

Untitled

a guest
Oct 1st, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. int main()
  2. {
  3. string test = "Danish letters: Æ Ø Å !!!!!!??||~";
  4. cout << "Test = " << test << endl;
  5.  
  6. for(int l = 0;l<test.size();l++)
  7. {
  8. if(!isalpha(test.at(l)) && test.at(l) != ' ')
  9. {
  10. test.replace(l,1," nope");
  11. }
  12. }
  13.  
  14. cout << "Test = " << test << endl;
  15.  
  16. return 0;
  17.  
  18. Test = Danish letters: Æ Ø Å !!!!!!??||~
  19. Test = Danish letters nope nope nope nope nope nope nope nope nope nope nope nope nope nope nope nope nope nope"
  20.  
  21. test.at(l)!='Å'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement