static void AddNameShorteningSection(string name, List<int> sections, int pos, int sectionEnd, StringBuilder sb)
{
var startIdx = sections[pos - sections[pos] - 1];
var prevSectionPos = pos - sections[pos] - 2;
if (prevSectionPos > 0)
AddNameShorteningSection(name, sections, prevSectionPos, startIdx, sb);
sb.Append(name[startIdx]);
var skip = 0;
for (var i = pos - sections[pos]; i < pos; i++)
if (sections[i] < 0)
skip += -sections[i];
for (var i = startIdx + 1 + skip; i < sectionEnd; i++)
sb.Append(name[i]);
}