public override Value Execute(Args args, Environment environment, SourcePos pos) { var obj = args.GetAsString("obj"); var output = args.GetOutput("out", environment.Get("stdout", pos).AsOutput()); output.Write(obj.GetValue()); return(ValueNull.NULL); }
public override Value Execute(Args args, Environment environment, SourcePos pos) { if (args.IsNull("str")) { return(ValueNull.NULL); } var value = args.GetString("str").GetValue(); var sep1 = args.GetAsString("sep1").GetValue(); var sep2 = args.GetAsString("sep2").GetValue(); var result = FuncSplit.SplitValue(value, sep1); var list = result.GetValue(); for (var i = 0; i < list.Count; i++) { list[i] = FuncSplit.SplitValue(list[i].AsString().GetValue(), sep2); } return(result); }
public override Value Execute(Args args, Environment environment, SourcePos pos) { if (args.IsNull("str")) { return(ValueNull.NULL); } var value = args.GetString("str").GetValue(); var delim = "[ \\t]+"; if (args.HasArg("delim")) { delim = args.GetAsString("delim").GetValue(); } return(SplitValue(value, delim)); }
public override Value Execute(Args args, Environment environment, SourcePos pos) { ValueString obj; if (args.HasArg("obj")) { obj = args.GetAsString("obj"); } else { obj = new ValueString(""); } var output = args.GetOutput("out", environment.Get("stdout", pos).AsOutput()); output.WriteLine(obj.GetValue()); return(ValueNull.NULL); }
public override Value Execute(Args args, Environment environment, SourcePos pos) { return(args.GetAsString("obj")); }