init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
56
KretaWeb/Helpers/CustomStringBuilder.cs
Normal file
56
KretaWeb/Helpers/CustomStringBuilder.cs
Normal file
|
@ -0,0 +1,56 @@
|
|||
using System.Text;
|
||||
|
||||
namespace Kreta.Web.Helpers
|
||||
{
|
||||
public class CustomStringBuilder
|
||||
{
|
||||
private StringBuilder builder = new StringBuilder();
|
||||
|
||||
public CustomStringBuilder Append(string s)
|
||||
{
|
||||
builder.Append(s);
|
||||
return this;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
public static implicit operator CustomStringBuilder(string s)
|
||||
{
|
||||
var m = new CustomStringBuilder();
|
||||
m.builder.Append(s);
|
||||
return m;
|
||||
}
|
||||
|
||||
public static CustomStringBuilder operator +(CustomStringBuilder m, string s)
|
||||
{
|
||||
return m.Append(s);
|
||||
}
|
||||
|
||||
public CustomStringBuilder AppendFormat(string format, object arg0, object arg1, object arg2)
|
||||
{
|
||||
builder.AppendFormat(format, arg0, arg1, arg2);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomStringBuilder AppendFormat(string format, params object[] args)
|
||||
{
|
||||
builder.AppendFormat(format, args);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomStringBuilder AppendFormat(string format, object arg0)
|
||||
{
|
||||
builder.AppendFormat(format, arg0);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomStringBuilder AppendFormat(string format, object arg0, object arg1)
|
||||
{
|
||||
builder.AppendFormat(format, arg0, arg1);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue