public char GetChar() { char c = (char)UTFConverter.GetCodeValueUTF16(Buffer[CurrentGetPos], Buffer[CurrentGetPos + 1]); CurrentGetPos += 2; return(c); }
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); }
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 + "]"); } }
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."); } }