Post History
Ruby, 56 bytes ->s,i{a=[*?a..?z].rotate(i)*"";s.tr "A-Za-z",a.upcase+a} Try it online! tr is wildly useful here. Builds the tr string manually and replaces only the alphabets.
Answer
#1: Initial revision
# [Ruby], 56 bytes <!-- language-all: lang-ruby --> ->s,i{a=[*?a..?z].rotate(i)*"";s.tr "A-Za-z",a.upcase+a} [Try it online!][TIO-krni38x0] [Ruby]: https://www.ruby-lang.org/ [TIO-krni38x0]: https://tio.run/##LYzLDoIwEEX3fsU4Kx@lCT7iwiBxp78gYTFoWwiEklIEa/z2iobcxUlOTq7pspeXkQ9OLSveFCWrmDiPXcqNtmTFoliuEI8ttwbwHNwocMiId82dWrGmj29AJngRVaUZ9NpUD2S7dPa31ujqN2QQ7ienBj2U4HKlLLhMD2DyGupiTA5TcYWeaguZEVRKau0c2WZ6BFTdU4IypYKRMpfIwm3qvw "Ruby – Try It Online" `tr` is wildly useful here. Builds the tr string manually and replaces only the alphabets.