2017-01-02 152 views

回答

2

嘗試是這樣的:

str = string.Join(Environment.NewLine, 
     str.Split(Environment.NewLine) 
      .Select(sub => sub.TrimStart())); 
+0

正是我所建議的,但用更優雅的方式書寫。 +1。 – Trickzter

相關問題