libsbml.OStringStream.str C# (CSharp) Method

str() public method

public str ( ) : string
return string
        public string str()
        {
            string ret = libsbmlPINVOKE.OStringStream_str__SWIG_0(swigCPtr);
            return ret;
        }

Same methods

OStringStream::str ( string s ) : void

Usage Example

 public void test_XMLOutputStream_CharacterReference()
 {
     OStringStream oss = new OStringStream();
       XMLOutputStream stream = new  XMLOutputStream(oss,"",false);
       stream.startElement( "testcr");
       stream.writeAttribute( "chars",    "one"     );
       stream.writeAttribute( "amp",      "&"       );
       stream.writeAttribute( "deccr",    "¨"  );
       stream.writeAttribute( "hexcr",    "¨");
       stream.writeAttribute( "lhexcr",   "¨");
       stream.writeAttribute( "nodeccr1", "&#01688"  );
       stream.writeAttribute( "nodeccr2", "&#;"     );
       stream.writeAttribute( "nodeccr3", "&#00a8;" );
       stream.writeAttribute( "nodeccr4", "&#00A8;" );
       stream.writeAttribute( "nohexcr1", "&#x;"    );
       stream.writeAttribute( "nohexcr2", "&#xABCD" );
       stream.endElement( "testcr");
       string expected =  "<testcr chars=\"one\" amp=\"&amp;\" deccr=\"&#0168;\" hexcr=\"&#x00a8;\" lhexcr=\"&#x00A8;\" nodeccr1=\"&amp;#01688\" nodeccr2=\"&amp;#;\" nodeccr3=\"&amp;#00a8;\" nodeccr4=\"&amp;#00A8;\" nohexcr1=\"&amp;#x;\" nohexcr2=\"&amp;#xABCD\"/>";
       string s = oss.str();
       assertTrue(( expected == s ));
       stream = null;
 }
All Usage Examples Of libsbml.OStringStream::str