7 kyu

The old switcheroo 2

1,512 of 3,349joh_pot

Description:

This is a follow up to my kata the old switcheroo.

Write a function that takes in a string and replaces all the letters with their respective positions in the English alphabet; e.g. 'a' is 1, 'z' is 26. The function should be case-insensitive.

'abc'      --> '123'
'ABC'      --> '123'
'codewars' --> '315452311819'
'abc-#@5'  --> '123-#@5'
Strings
Fundamentals

Similar Kata:

Stats:

CreatedAug 21, 2015
PublishedAug 21, 2015
Warriors Trained5018
Total Skips214
Total Code Submissions8261
Total Times Completed3349
JavaScript Completions1178
C# Completions520
CoffeeScript Completions22
Python Completions1512
Ruby Completions171
C Completions77
Total Stars61
% of votes with a positive feedback rating93% of 622
Total "Very Satisfied" Votes547
Total "Somewhat Satisfied" Votes68
Total "Not Satisfied" Votes7
Ad
Contributors
  • joh_pot Avatar
  • JoshSchreuder Avatar
  • g964 Avatar
  • GiacomoSorbi Avatar
  • Jotha Avatar
  • kazk Avatar
  • bidouille Avatar
  • hobovsky Avatar
  • trashy_incel Avatar
  • ejini战神 Avatar
  • SummerTheCoder Avatar
Ad