Moving string to new variable

Figuring out how to move a string into a new variable inside of an 'if' statement.