title: removing a char from string in Unity3D
body: <p>I am making a word game in unity3D game engine, I make a word if word spelling is wrong I want to remove a certain character from that word for making a correct spelling and then other character shift back...  in my code I have an string and want to remove a char from string.... so that when the char is removed from the center of the string other char shift back.</p>
  
  <pre><code>static var nextPos = 200;
  static var word: String;
  var sel: String;
  var isClicked : boolean=false;
  var xpos: float = 200;
  static var i:int=0;
  function start()
  {
   word="";
  }
  function OnMouseDown()
  {
      if (!isClicked) {
         isClicked = true;
         xpos = nextPos;
         sel=OnGUI();
         word=word+sel;
         nextPos += 8;
         i++;
  
        }
  else if(isClicked)
    {
    isClicked = false;
    xpos = nextPos;
    nextPos -= 8;
  
  }
  }
  function OnGUI()
  {  
  
     if (gameObject.name == "Sphere(Clone)" &amp;&amp; isClicked )
     {
            GUI.Label(new Rect(xpos,260,400,100), "A");
            return "A";
  
  
     }
  
     else if (gameObject.name == "Sphere 1(Clone)" &amp;&amp; isClicked )
     {
            GUI.Label(new Rect(xpos,260,400,100), "B");
            return "B";
  
     }  
  
     else if (gameObject.name == "Sphere 2(Clone)" &amp;&amp; isClicked )
     {
            GUI.Label(new Rect(xpos,260,400,100), "C");
            return "C";
  
     }
  
    GUI.Label(new Rect(xpos,280,400,100), "Value" + i);
    GUI.Label(new Rect(xpos,300,400,100), word);                      
  }
  </code></pre>