У меня есть текстовый файл, поэтому он выглядит следующим образом.
Some old wounds never truly heal, and bleed again at the slightest word.
Fear cuts deeper than swords.
Winter is coming.
If I look back I am lost.
Nothing burns like the cold.
, и мне нужно, чтобы длина строк равнялась длине самой длинной, добавляя пробелы
static void Reading(string fd, out int nr)
{
string[] lines = File.ReadAllLines(fd, Encoding.GetEncoding(1257));
int length = 0;
nr = 0;
int nreil = 0;
foreach (string line in lines)
{
if (line.Length > length)
{
length = line.Length;
nr = nreil;
}
nreil++;
}
}
edit: простозаполнение предложений пробелами между словами