Win an Ipad
  Developer   Documents   String stream

String stream

This article explains String stream implementation in Moscrif.

String operation

Opens in-memory string output stream with initialSize (integer) of its buffer. You should use string streams when you plan to update certain string frequently or compose string from many components. String streams are also known as StringBuffer/StringBuilder in Java or .NET. To get current content of the string stream, use its method toString.

See Example of String stream in xml parser:

var source = "core

All integers are represented by this class.";
var stream = Stream.openString(source);
var scanner = new XMLScanner( stream );
var token = "";
while (token = scanner.token()) {
    switch(token) {
          case XMLScanner.HEAD_END:       //do some code
                                          continue;
          case XMLScanner.EOF:            return;
          case XMLScanner.ERROR:          console << "XML error at line " + scanner.lineNo << "\n";
          case XMLScanner.HEAD:           //do some code
                                          break;
          default:                        continue;
      }
}

 JSON Object   String stream   Files and Databases 
Write a Comment (0)
Subject
Please complete this mandatory field.
HTML Tags Not Allowed!
Comment
Please complete this mandatory field.