Class DynamicVirtualStringValue
An implementation of DynamicVirtualValue which stores a string.
Stack modes
Concat
: Returnslhs .. rhs
, default base value is""
(empty string)ConcatReverse
: Returnsrhs .. lhs
, default base value is""
(empty string)
Usage
local dvnv = DynamicVirtualStringValue.new("Concat") dvnv:newChild("Hello") dvnv:newChild("World") dvnv:newChild("Spam") print(dvnv:get()) --> "Hello" .. "World" .. "Spam" => "HelloWorldSpam" local dvnv2 = DynamicVirtualNumberValue.new("ConcatReverse", "Foo") dvnv2:newChild("Bar") print(dvnv2:get()) --> "Bar" .. "Foo" => "BarFoo" dvnv:addChild(dvnv2) print(dvnv:get()) --> "Hello" .. "World" .. "Spam" .. ("Bar" .. "Foo") => "HelloWorldSpamBarFoo"