DEV Community

Discussion on: Daily Challenge #47 - Alphabets

Collapse
 
sonugan profile image
sonugan

C#

public static string AlphabetPosition(string text)
{
   return string.Join(" ", text
    .ToLower()
    .Where(c => char.IsLetter(c))
    .Select(c => (c - 'a') + 1)
    .ToList());
}