v1.5.7.0 (Summer Update)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#nullable enable
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
internal readonly struct NetLimitedString
|
||||
{
|
||||
public readonly string Value;
|
||||
public const int MaxLength = 255;
|
||||
|
||||
public static readonly NetLimitedString Empty = new(string.Empty);
|
||||
|
||||
public NetLimitedString(string value)
|
||||
{
|
||||
Value = value.Length > MaxLength
|
||||
? value[..MaxLength]
|
||||
: value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
=> Value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user