Beispiel #1
0
        public mstring GetString(int length)
        {
            rs.GetBytes(dummy, 0, 1);
            byte[] buf = new byte[length * 2];
            rs.GetBytes(buf, 0, buf.Length);
            string  s  = System.Text.Encoding.Unicode.GetString(buf);
            mstring ms = mstring.Prepare(s);

            ms = ms.TrimM('\0');
            return(ms);
        }
Beispiel #2
0
        public mstring GetString(ByteSlice input)
        {
#if DEBUG_FTGET
            if (Types.IsNullValue(input))
            {
                throw new Exception("DEBUG:  GetString: (Types.IsNullValue(input))");
            }
#endif
            mstring x = mstring.PrepareUTF16(ByteSlice.Prepare(input, 1, input.Length - 1));
            x = x.TrimM('\0');
            return(x);
        }