Код: Выделить всё
So possible new line chars:
* \n
* \r
* \r\n
Код: Выделить всё
This is [\n]
an string that [\r]
has four [\r\n]
lines
Код: Выделить всё
static int GetLineCount(string input)
{
// could you provide a good implementation for this method?
// I want to avoid string.split since it performs really bad
}
Подробнее здесь: https://stackoverflow.com/questions/333 ... line-break
Мобильная версия