NetDataWriterPut(String, Int32) Method |
Serializes a string using a 2-byte
UInt16 length header.
Namespace: LiteNetLib.UtilsAssembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntaxpublic void Put(
string value,
int maxLength = 0
)
Parameters
- value String
- The string to write to the buffer.
- maxLength Int32 (Optional)
-
The maximum number of characters to write. If the string is longer, it will be truncated.
A value of 0 indicates no limit.
Remarks
Note that
maxLength limits the number of characters, not the total size in
Bytes.
Uses
UTF8.
See Also