How do I retrieve a substring from a variable?

Let's assume that a variable temp_var contains value "good morning"
To retrieve first four characters…

Set V[temp] "&[temp_var](1-4)"

This statement will store value "good" in the variable temp.