6 kyu

Replace With Alphabet Position

97,178 of 215,447MysteriousMagenta

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

More By Author:

Check out these other kata created by MysteriousMagenta

Stats:

CreatedNov 21, 2014
PublishedNov 21, 2014
Warriors Trained424771
Total Skips50628
Total Code Submissions863862
Total Times Completed215447
Python Completions97178
JavaScript Completions84018
C# Completions14677
PHP Completions5478
C Completions2471
Ruby Completions4810
Rust Completions2712
Scala Completions793
NASM Completions27
Groovy Completions102
COBOL Completions8
Haskell Completions509
Crystal Completions19
CoffeeScript Completions14
Julia Completions59
C++ Completions3962
Factor Completions15
D Completions8
Lua Completions66
TypeScript Completions762
Total Stars3680
% of votes with a positive feedback rating90% of 18747
Total "Very Satisfied" Votes15326
Total "Somewhat Satisfied" Votes3159
Total "Not Satisfied" Votes262
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