Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private String checkFormat(String line) {
- if (line.charAt(0) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 1 && line.charAt(1) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 2 && line.charAt(2) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 4 && line.charAt(4) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 5 && line.charAt(5) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 6 && line.charAt(6) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 10 && line.charAt(10) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 12 && line.charAt(12) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 13 && line.charAt(13) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 14 && line.charAt(14) == '\t') {
- line = line.replaceFirst("\t", " ");
- }
- if (line.length() > 8 && line.charAt(8) != ' ') {
- System.out.println("Error in Format");
- }
- if (line.length() > 15 && line.charAt(15) != ' ' && line.charAt(15) != '\t') {
- System.out.println("Error in Format");
- }
- if (line.length() > 16 && line.charAt(16) != ' ' && line.charAt(16) != '\t') {
- System.out.println("Error in Format");
- }
- return line;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement