public ScriptValue.Str CreateScriptValue(string value) { if (StrValues.ContainsKey(value)) { return(StrValues[value]); } return(StrValues[value] = new ScriptValue.Str(value)); }
public ScriptValue.Str GetString(uint offset) { if (StrElements.ContainsKey(offset)) { return(StrElements[offset]); } return(StrElements[offset] = new ScriptValue.Str(Reader.Seek(offset).ReadNullTerminatedString())); }
public uint Write(ScriptValue.Str value) { if (Offsets.ContainsKey(value)) { return(Offsets[value]); } uint offset = (uint)Stream.Position; Writer.WriteNullTerminatedString(value.StringValue); return(Offsets[value] = offset); }