hessiancsharp.io.CHessianOutput.PrintLenString C# (CSharp) Method

PrintLenString() public method

Prints a string to the stream, encoded as UTF-8 with preceeding length
public PrintLenString ( string strValue ) : void
strValue string the string to print
return void
        public void PrintLenString(string strValue)
        {
            if (strValue == null)
            {
                m_srOutput.WriteByte(0);
                m_srOutput.WriteByte(0);
            }
            else
            {
                int intLength = strValue.Length;
                m_srOutput.WriteByte((byte) (intLength >> 8));
                m_srOutput.WriteByte((byte) intLength);
                PrintString(strValue, 0, intLength);
            }
        }