mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 23:34:10 +02:00
Added string addition
This commit is contained in:
parent
2ea366ce89
commit
840a60697d
2 changed files with 41 additions and 0 deletions
|
@ -941,6 +941,44 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
public void operator+=(String str)
|
||||
{
|
||||
Append(str);
|
||||
}
|
||||
|
||||
public void operator+=(StringView sv)
|
||||
{
|
||||
Append(sv);
|
||||
}
|
||||
|
||||
public void operator+=(char8 c)
|
||||
{
|
||||
Append(c);
|
||||
}
|
||||
|
||||
public void operator+=(char32 c)
|
||||
{
|
||||
Append(c);
|
||||
}
|
||||
|
||||
[Error("String addition is not supported. Consider allocating a new string and using Append, Concat, or +=")]
|
||||
public static String operator+(String lhs, String rhs)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
|
||||
[Error("String addition is not supported. Consider allocating a new string and using Append, Concat, or +=")]
|
||||
public static String operator+(String lhs, StringView rhs)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
|
||||
[Error("String addition is not supported. Consider allocating a new string and using Append, Concat, or +=")]
|
||||
public static String operator+(String lhs, char32 rhs)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
|
||||
public void EnsureNullTerminator()
|
||||
{
|
||||
int allocSize = AllocSize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue