'Nginx - convert string to number

The question is simple let's say I have a variable in nginx:

set $test $upstream_status;

And now the status in the variable will be for example "200". How I can convert this variable to number in order to use it like so:

return $test "test";


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source