public IValue StrGetLine(IValue str, IValue number) { int line_number = number.AsInt(); var str_arg = str.AsString(); string result = ""; if (line_number >= 1) { string[] subStrVals = str_arg.Split('\n', line_number + 1); result = subStrVals[line_number - 1]; } return(ValueFactory.Create(result)); }
public bool Equals(IValue other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (other.BaseType == ValueTypeEnum.TYPE) { return(_value.Index == other.AsInt()); } return(false); }
public int CompareTo(IValue other) { return(_value.Index.CompareTo(other.AsInt())); }
public void Set(IValue index, IValue value) { _values[index.AsInt()] = value; }
public IValue Get(IValue index) { return(_values[index.AsInt()]); }
public void Delete(IValue value) { _values.RemoveAt(value.AsInt()); }
public void Insert(IValue index, IValue value) { _values.Insert(index.AsInt(), value); }