Meta Interview Question

Given one string to sort and another that defines the order, sort the first string in the order the second string defines.