I\'d like to write an extension method to the String class so that if the input string to is longer than the provided length N, only the first
String
N
string truncatedToNLength = new string(s.Take(n).ToArray());
This solution has a tiny bonus in that if n is greater than s.Length, it still does the right thing.