对字符操作 比较 介绍比较详细的文章。
http://www.codeproject.com/KB/cs/StringBuilder_vs_String.aspx
String Operation |
Most Efficient |
---|---|
Insert |
StringBuilder.Insert > 2 Insertion Strings |
Remove |
StringBuilder is faster > 2 characters |
Replace |
String.Replace always |
Format |
String.Format < 5 Append + Format operations |
Concatenation |
+ for 2 strings |