Skip to main content
7 of 9
minor edit, fixing generic syntax

C#, 406 bytes

  • takes file list from passed arguments.
  • read every char in every file than only converts to lower case if and only if the character in the A..Z range than send it to STDOUT.
  • If there is no file list than reads STDIN, reads every char, converts to lower case if and only if the character in the A..Z range than send it to STDOUT.
using System; using System.IO; using System.Linq; class P{ static void Main(string[] a){ Action<char> e= C=>{var c= char.ToLower(C); Console.Out.Write(c>='a'&& c<='z' ?c:C); }; if(a.Length>0) a.ToList().ForEach(f=>File.ReadAllText(f).ToCharArray().ToList().ForEach(e)); else while(true) Console.In.ReadLine().ToCharArray().ToList().ForEach(e); } }