using System.Globalization;
using System.Linq;
using System.Text;
namespace jQueryBuddy.Utilities
{
public static class StringExtensions
{
///
/// Returns the number of lines appearing in
/// where a line is counted as a '\n'
///
///
///
public static int CountOfLines(this string target)
{
if (string.IsNullOrEmpty(target)) return 0;
return target.Count(t => t == '\n') + 1;
}
}
}