IronPython.Modules.MemoryHolder.WriteUnicodeString C# (CSharp) Method

WriteUnicodeString() private method

private WriteUnicodeString ( int offset, string value ) : void
offset int
value string
return void
        internal void WriteUnicodeString(int offset, string value) {
            // TODO: There's gotta be a better way to do this
            for (int i = 0; i < value.Length; i++) {
                WriteInt16(checked(offset + i * 2), (short)value[i]);
            }
        }

Usage Example

示例#1
0
            private void WriteString(MemoryHolder address, int offset, string str)
            {
                SimpleType st = (SimpleType)_type;

                Debug.Assert(st._type == SimpleTypeKind.WChar && str.Length <= _length);
                if (str.Length < _length)
                {
                    str = str + '\x00';
                }
                address.WriteUnicodeString(offset, str);
            }
All Usage Examples Of IronPython.Modules.MemoryHolder::WriteUnicodeString