If statement PLZ HELP!!!!

I typed

var stringToEdit : String = "Hello World";
   Function OnGUI () {
         stringToEdit = GUI.TextField (Rect (10, 10, 200, 20), stringToEdit, 25);

to make a textbox how do i make an if statement to tell if textbox = “Text”

var stringToEdit : String = “Hello World”;

Function OnGUI () 
{         
  stringToEdit = GUI.TextField (Rect (10, 10, 200, 20), stringToEdit, 25);
  if (stringToEdit == "Text")
  {
    // TODO : your stuff here
  }
}

You’ve pretty much answered your own question:

if(textbox == "Text"){
   //Do something
}

But, I’m guessing you want to check if there is actually any text in ‘textbox’, and not the actual word? In that case:

if(textbox != ""){
   //Do Something
}

This basically means: if textbox does NOT equal empty