Function encodeFunctionString