private void ReplaceEmoji(StringBuilder builder, Emoji emoji, string text, int index) { if (Remove) { return; } if (builder.Length > 0 && builder[builder.Length - 1] != ' ') { builder.Append(' '); } builder.Append(emoji.AsShortcode()); if (index < (text.Length - 1) && text[index + 1] != ' ') { builder.Append(' '); } }