Skip to main content
further minification of the code
Source Link

C#, 406342 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.
usingnamespace System;System{ using System.IO; using System.Linq; class P{  static void Main(string[] astring[]a){  Action<char> e= C=>Action<char>e=C=>{var c= charc=char.ToLower(C); Console;Console.Out.Write(c>='a'&& c<='z' 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);  } } } 

C#, 328319 bytes

single-liner, same as above:

using System;usingnamespace System.{using 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);}}} 

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);  } } 

C#, 328 bytes

single-liner, same as above:

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);}} 

C#, 342 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.
namespace System{ using IO; using 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); } } } 

C#, 319 bytes

single-liner, same as above:

namespace System{using IO;using 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);}}} 
added single-liner form
Source Link

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); } } 

C#, 328 bytes

single-liner, same as above:

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);}} 

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); } } 

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); } } 

C#, 328 bytes

single-liner, same as above:

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);}} 
minor edit, fixing generic syntax
Source Link

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&lt;char&gt;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); } } 

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&lt;char&gt; 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); } } 

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); } } 
Prettified.
Source Link
TheNumberOne
  • 11.6k
  • 1
  • 40
  • 72
Loading
minor change, fixed code formatting
Source Link
Loading
code clean up and simplifications
Source Link
Loading
bug fix, minor improvements
Source Link
Loading
a better answer than the last one
Source Link
Loading
Source Link
Loading