Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public String[] getTokens(String s)
  2. {
  3. String[] tokens;
  4. tokens = s.split(",");
  5. tokens = s.split(" ");
  6. int pos = 0;
  7. for(int i = 0; i < tokens.length; i++)
  8. {
  9. if(tokens[i].equals(";") || tokens[i].equals(","))
  10. {
  11. tokens[i] =" ";
  12. pos = i;
  13. break;
  14. }
  15. }
  16.  
  17. public void execute()
  18. {
  19. File[] filesArray = dt.returnFiles();
  20. for(File f : filesArray)
  21. {
  22. try
  23. {
  24. fileContent = dt.loadFile(f);
  25.  
  26. for(int i=0; i < fileContent.size(); i++)
  27. {
  28.  
  29. if(fileContent.get(i).equals(",") || fileContent.get(i).equals(";") ||
  30. fileContent.get(i).isEmpty())
  31. {
  32. fileContent.remove(i);
  33. }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement