❔ is it possible to add // at beginning of text line when caret is in current line?
Hello all, in a RichTextBox I split text by line, but I need to add the symbol // at the beginning of a line when caret is in it
int index = new GetFirstCharIndexFromCurrentLine()
int line = new GetLineFromCharIndex(iNdEx)
string[] str = new rtb.Text.Split('/n');
2 Replies
string.Join("\n", str.Select(line => line.Contains("^") ? "//" + line : line))
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.
Was this issue resolved? If so, run /close
- otherwise I will mark this as stale and this post will be archived until there is new activity.