添加项目文件。
This commit is contained in:
43
TightWiki.Engine/WikiString.cs
Normal file
43
TightWiki.Engine/WikiString.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace TightWiki.Engine
|
||||
{
|
||||
public class WikiString
|
||||
{
|
||||
public WikiString()
|
||||
{
|
||||
}
|
||||
|
||||
public WikiString(string value)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public string Value { get; set; } = string.Empty;
|
||||
|
||||
public int Length => Value.Length;
|
||||
|
||||
public void Replace(string oldValue, string newValue)
|
||||
{
|
||||
Value = Value.Replace(oldValue, newValue);
|
||||
}
|
||||
|
||||
public void Insert(int position, string value)
|
||||
{
|
||||
Value = Value.Insert(position, value);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
Value = string.Empty;
|
||||
}
|
||||
|
||||
public void Append(string value)
|
||||
{
|
||||
Value += value;
|
||||
}
|
||||
|
||||
public new string ToString()
|
||||
{
|
||||
return Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user