Skip to content

Commit

Permalink
줄바꿈 개행문자 치환
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-DoHa committed Nov 25, 2022
1 parent 9782678 commit 45ae9aa
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
Binary file modified .gradle/7.5.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.5.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file not shown.
Binary file modified build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,25 @@ public void write(MessageCreate messageCreate) {
break;
}
tmpString = messageCreate.getBody().substring(startIndex, startIndex+23);
tmpString = tmpString.replaceAll("(\r\n|\r|\n\r)", "\n");
tmpString = tmpString.strip();

int lastIndex = tmpString.length()-1;

if(tmpString.contains("\n")) {
for(int j = 0; j < tmpString.length(); j++) {
if(tmpString.charAt(j) == '\n') {
lastIndex = j;
tmpString = tmpString.substring(startIndex, j+1);
lastIndex = j+1;
tmpString = tmpString.substring(startIndex, lastIndex);
i--;
break;
}
}
}

if(tmpString.contains(" ")) {
while(tmpString.charAt(lastIndex) != ' ') {
lastIndex--;
} else {
if (tmpString.contains(" ")) {
while (tmpString.charAt(lastIndex) != ' ') {
lastIndex--;
}
}
}

Expand Down

0 comments on commit 45ae9aa

Please sign in to comment.