对字符操作 比较 介绍比较详细的文章。
http://www.codeproject.com/KB/cs/StringBuilder_vs_String.aspx
String.Insert vs StringBuilder


String.Replace

String.Format

String Concatenation

String Comparison

String Operation

Most Efficient

Insert

StringBuilder.Insert > 2 Insertion Strings
String.Insert otherwise

Remove

StringBuilder is faster > 2 characters
to remove

Replace

String.Replace always

Format

String.Format < 5 Append + Format operations
StringBuilder.AppendFormat > 5 calls

Concatenation

+ for 2 strings
String.Join > 2 strings to concatenate








posted on 2006-07-27 10:40  try  阅读(391)  评论(0编辑  收藏  举报