mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Add / Remove Components
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
namespace System
|
||||
{
|
||||
extension String
|
||||
{
|
||||
[Inline]
|
||||
public void CopyTo(Span<char8> target)
|
||||
{
|
||||
CopyTo(target.Ptr, target.Length);
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public void CopyTo(char8* target, int targetLength)
|
||||
{
|
||||
int copiedChars = Math.Min(targetLength - 1, Length);
|
||||
|
||||
Internal.MemCpy(target, Ptr, copiedChars);
|
||||
|
||||
target[copiedChars] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user