ROT13 is a simple letter substitution cipher that replaces a letter with the letter 13 letters after it in the alphabet. ROT13 is an example of the Caesar cipher.
Create a function that takes a string and returns the string ciphered with Rot13. If there are numbers or special characters included in the string, they should be returned as they are. Only letters from the latin/english alphabet should be shifted, like in the original Rot13 "implementation".
결과 값 : uryyb zl anzr vf fnzhry!!!
정규식으로 a-z까지/ g: 글자의 전역을 검색하고 i: 대소문자 구분 x
, 함수로 선택한 글자를 바꿔주는 코드.
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm
A를 넣으면 N이 나오는 암호 알고리즘. 글자를 13자리 밀어내는것으로 만듦.
좀 접근이 잘못됐었으나 해결.