How to print string in systemverilog

In reply to Alok_Mandal:

You need to put a backslash \ character before the double-quote ". There is no need to do this for a single-quote.

string str="\"OFF\"";
string str="'10ns'";

See section 5.9.1 Special characters in strings in the IEEE 1800-2017 LRM.