Exemplo n.º 1
0
        public char GetChar()
        {
            char c = (char)UTFConverter.GetCodeValueUTF16(Buffer[CurrentGetPos], Buffer[CurrentGetPos + 1]);

            CurrentGetPos += 2;
            return(c);
        }
Exemplo n.º 2
0
        public static int PutChar(char c)
        {
            byte b0 = 0x0;
            byte b1 = 0x0;

            UTFConverter.ConvertCodeValueToBytesUTF16((int)c, ref b0, ref b1);
            Stack.PutByte(b0);
            Stack.PutByte(b1);
            return(2);
        }
Exemplo n.º 3
0
        public void PutChar(char c)
        {
            byte b0 = 0x0;
            byte b1 = 0x0;

            UTFConverter.ConvertCodeValueToBytesUTF16((int)c, ref b0, ref b1);
            Buffer.Add(b0);
            Buffer.Add(b1);

            if (StaticGlobals.ExecutionMode == ExecutionMode.DEBUG)
            {
                PutToDummy("[(char) " + c + "]");
            }
        }
Exemplo n.º 4
0
 internal static int ReplaceChar(int index, char c)
 {
     if (index + 1 < Stack.CurrentPos)
     {
         byte b0 = 0x0;
         byte b1 = 0x0;
         UTFConverter.ConvertCodeValueToBytesUTF16((int)c, ref b0, ref b1);
         Stack.ReplaceByte(index, b0);
         Stack.ReplaceByte(index + 1, b1);
         return(2);
     }
     else
     {
         throw new ArgumentException("index supplied is not occupied yet.  Can't replace byte.");
     }
 }