1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Allow appending object to String

This commit is contained in:
disarray2077 2022-05-29 20:55:42 -03:00 committed by GitHub
parent 087a129007
commit d77e1b5650
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1037,6 +1037,13 @@ namespace System
}
}
}
public void Append(Object object)
{
if (object == null)
return;
Append(object.ToString(.. scope .()));
}
public void operator+=(String str)
{
@ -1058,6 +1065,11 @@ namespace System
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 +=")]
public static String operator+(String lhs, String rhs)
{