Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. void wortspiegel(string &text, int pos)
  2. {
  3. string tmp_text;
  4. int end = 0;
  5. tmp_text = text;
  6. for (int i = pos; i < text.length(); i++)
  7. {
  8. if (!(text[i] >= 'a' && text[i] <= 'z') && !(text[i] >= 'A' && text[i] <= 'Z')) {
  9. end = i-1;
  10. break;
  11. }
  12. }
  13.  
  14. for (int i = pos; i <= end; i++)
  15. {
  16. cout << "i: " << i << endl << "das andere:" << end - (i - start) << endl;
  17. text[i] = text[pos+end-i];
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement