6 kyu

Replace With Alphabet Position

96,889 of 214,809MysteriousMagenta

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 Trained423678
Total Skips50541
Total Code Submissions862094
Total Times Completed214809
Python Completions96889
JavaScript Completions83809
C# Completions14641
PHP Completions5463
C Completions2464
Ruby Completions4802
Rust Completions2703
Scala Completions792
NASM Completions27
Groovy Completions102
COBOL Completions8
Haskell Completions507
Crystal Completions19
CoffeeScript Completions14
Julia Completions58
C++ Completions3928
Factor Completions15
D Completions7
Lua Completions64
TypeScript Completions731
Total Stars3674
% of votes with a positive feedback rating90% of 18721
Total "Very Satisfied" Votes15304
Total "Somewhat Satisfied" Votes3155
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