Always remain updated about current software development trends

Articles by AKEMPER

Counting lines in a string

I've compared your favorite with seven alternatives:static long LinesCount(string s) { long count = 0; int position = 0; while ((position = s.IndexOf('\ ', position)) != -1) { count++; position++; // Skip this occurance!...

  • Page 1 of 1
  •