mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 15:26:00 +02:00
Merge pull request #1578 from disarray2077/patch-12
Allow appending Object to String
This commit is contained in:
commit
1311c8fa09
1 changed files with 12 additions and 0 deletions
|
@ -1037,6 +1037,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)
|
||||||
{
|
{
|
||||||
|
@ -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