I am trying to dramatically reduce lines of code in my program and I would like to know if it is possible to perform string interpolation in Hollywood?
Take the following code which I am attempting to make valid:
Code: Select all
Function base:FuncOnField(id, field, func)
mui.Set(id, mui.Get(id, field), func(id,field))
EndFunction
base:FuncOnField(msg.id,"contents","LowerStr") ; a typical call might be
base:FuncOnField(msg.id,"contents","UpperStr") ; or
Code: Select all
Function base:FuncOnField(id, field, func)
If func = "LowerStr"
mui.Set(id, mui.Get(id, field), LowerStr(field))
ElseIf func = "UpperStr"
mui.Set(id, mui.Get(id, field), UpperStr(field))
EndIf
EndFunction