将字符串转换为字符串文字

fre*_*low 1 java string string-literals

可能重复:
如何将String转换为Java字符串文字?

是否有一个库函数,它接受一个字符串并将其转换为相应的字符串文字?例:

Please say\ask "What?" three times! - > "Please say\\ask \"What?\" three times!"