Clear string builder : StringBuilder « Dojo toolkit « JavaScript DHTML





Clear string builder

 

<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojox.string.Builder");
      dojo.require("dojox.string.sprintf");

      function testIt() {
        var b = new dojox.string.Builder("Java");
        b.clear();
        alert(b);
        b.append("Hello, world!");
        alert(b);
      }
    </script>
  </head>
  <body onLoad="testIt();">
  </body>
</html>

   
  










Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.Insert at index
2.Replace string in string buffer
3.Create StringBuilder
4.Append to string builder