Is There a Server Action for the PHP htmlspecialchars function?

I’m wondering if there is any function within server actions which performs the PHP equivalent of:

$input = htmlspecialchars($input, ENT_QUOTES, 'UTF-8');