mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 22:34:09 +02:00
Allow appending object to String
This commit is contained in:
parent
087a129007
commit
d77e1b5650
1 changed files with 12 additions and 0 deletions
|
@ -1038,6 +1038,13 @@ namespace System
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Append(Object object)
|
||||||
|
{
|
||||||
|
if (object == null)
|
||||||
|
return;
|
||||||
|
Append(object.ToString(.. scope .()));
|
||||||
|
}
|
||||||
|
|
||||||
public void operator+=(String str)
|
public void operator+=(String str)
|
||||||
{
|
{
|
||||||
Append(str);
|
Append(str);
|
||||||
|
@ -1058,6 +1065,11 @@ namespace System
|
||||||
Append(c);
|
Append(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void operator+=(Object obj)
|
||||||
|
{
|
||||||
|
Append(obj);
|
||||||
|
}
|
||||||
|
|
||||||
[Error("String addition is not supported. Consider allocating a new string and using Append, Concat, or +=")]
|
[Error("String addition is not supported. Consider allocating a new string and using Append, Concat, or +=")]
|
||||||
public static String operator+(String lhs, String rhs)
|
public static String operator+(String lhs, String rhs)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue