-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
파일명 오타 #29
Comments
그 외) |
일단 테이블을 만들때 예외처리 할 경우의 수가 몇 가지 있어서 처리해두었습니다. function checkException(title) {
switch (title) {
case '수박수박수박수박수박수':
return '수박수박수박수박수박수?';
case 'H Index':
return 'H-Index';
case 'N Queen':
return 'N-Queen';
case '오픈채팅방':
return '오픈채팅방 ';
default:
return title;
}
} '오픈채팅방'의 경우는 문제 페이지에서 '오픈채팅방 '으로 되어있습니다. 리터럴의 경우 말씀하신 ''같이 이스케이프 문자를 넣어서 표현하면, const fileName = `H'-'Index.js`;
const title = fileName
.split('-').join(' ') // H' 'Index.js
.replaceAll(/' '/g, '-') // H-Index.js
.slice(0, -3) // H-Index 이렇게 리터럴을 중간에 처리할 수 있습니다. |
해당 예외가 많아지면 모르겠지만, 현재로써는 문제가 없군요! |
제가 이전에 했던 답변에서 이스케이프 문자가 정말 이스케이프 문자라서 표현이 안됐네요! |
지금까지 풀어진 문제를 아스키코드 순으로 정렬해서 표에 표시를 하고 싶었지만 수작업으로 하려면 너무 복잡해서 우선 표를 추가하지 않고 있었는데, 센스있게 추가해주셔서 감탄했습니다 👍👍 |
Windows에서 파일명으로 백슬래쉬( 페이지에 있는 문제 전체에서 저 또한 프로젝트에 기여하면서 즐거운 경험을 했습니다👍👍 |
level-1 >> 히샤드-수.js : [하샤드-수.js]여야 합니다.
level-2 >> K-번째수.js : [K번째수.js] 여야 합니다.
level-3 >> 2_x_n_타일링.js : [2-x-n-타일링.js] 여야 합니다.
파일명 3개가 잘못되었습니다.
그 외 예외 )
수박수박수박수박수박수.js - windows에서 불가능한 파일명 '?'를 제거.
H-Index.js - 띄어쓰기를 '-'로 표현하는 것과 리터럴 그대로('-') 쓰는 것이 겹침.
N-Queen.js - 위와 동일.
The text was updated successfully, but these errors were encountered: