Advertisement
ijontichy

<stdin>

Jun 18th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function int cleanString(int string)
  2. {
  3. int ret = "";
  4. int strSize = StrLen(string);
  5.  
  6. int c, i, ignoreNext;
  7.  
  8. for (i = 0; i < strSize; i++)
  9. {
  10. c = GetChar(string, i);
  11.  
  12. if ( ( ((c > 8) && (c < 14)) || ((c > 31) && (c < 127)) || ((c > 160) && (c < 173)) ) && !ignoreNext)
  13. {
  14. ret = StrParam(s:ret, c:c);
  15. }
  16. else if (c == 28 && !ignoreNext)
  17. {
  18. ignoreNext = 1;
  19. }
  20. else
  21. {
  22. ignoreNext = 0;
  23. }
  24. }
  25.  
  26. return ret;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement