I want to add a white-space before the start of each line and except the first line of string. I am using
input:
abc
def
efg
hij
output:
abc
def
efg
hij
My code:
string text = "abc\ndef\nhij";
string result = string.Join(Environment.NewLine, text
.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)
.Select(line => " " + line));
TextArea1_trim_id.InnerText = result;