6 kyu

Replace With Alphabet Position

98,303 of 217,831MysteriousMagenta

Description:

Welcome.

In this kata you are required to, given a string, replace every letter with its position in the alphabet.

If anything in the text isn't a letter, ignore it and don't return it.

"a" = 1, "b" = 2, etc.

Example

Input = "The sunset sets at twelve o' clock."
Output = "20 8 5 19 21 14 19 5 20 19 5 20 19 1 20 20 23 5 12 22 5 15 3 12 15 3 11"
Strings
Fundamentals

Similar Kata:

More By Author:

Check out these other kata created by MysteriousMagenta

Stats:

CreatedNov 21, 2014
PublishedNov 21, 2014
Warriors Trained428882
Total Skips50940
Total Code Submissions870250
Total Times Completed217831
Python Completions98303
JavaScript Completions84781
C# Completions14790
PHP Completions5509
C Completions2529
Ruby Completions4843
Rust Completions2751
Scala Completions799
NASM Completions29
Groovy Completions103
COBOL Completions8
Haskell Completions521
Crystal Completions19
CoffeeScript Completions14
Julia Completions60
C++ Completions4108
Factor Completions15
D Completions8
Lua Completions76
TypeScript Completions856
Total Stars3708
% of votes with a positive feedback rating90% of 18850
Total "Very Satisfied" Votes15413
Total "Somewhat Satisfied" Votes3174
Total "Not Satisfied" Votes263
Ad
Contributors
  • MysteriousMagenta Avatar
  • jhoffner Avatar
  • omegahm Avatar
  • bkaes Avatar
  • Unnamed Avatar
  • suic Avatar
  • anter69 Avatar
  • picodealion Avatar
  • is151014 Avatar
  • donaldsebleung Avatar
  • aweleshetu Avatar
  • kazk Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • Souzooka Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • RSAkidinUSA Avatar
  • cliffstamp Avatar
  • uniapi Avatar
  • xavierguihot Avatar
  • MichaelByrneAU Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • tri@ Avatar
  • dfhwze Avatar
  • KayleighWasTaken Avatar
  • metatable Avatar
  • saudiGuy Avatar
  • JavaScripts Avatar
Ad