renamed function, added test case
diff --git a/tinyxml2.h b/tinyxml2.h
index 35b61af..df9e049 100644
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -1372,9 +1372,11 @@
*/
const char* CStr() const { return buffer.Mem(); }
/**
- Return the size of the XML file in memory
+ If in print to memory mode, return the size
+ of the XML file in memory. (Note the size returned
+ includes the terminating null.)
*/
- const int SizeOfCStr()const{ return buffer.Size(); }
+ const int CStrSize()const{ return buffer.Size(); }
private:
void SealElement();
diff --git a/xmltest.cpp b/xmltest.cpp
index d73b90a..74b2f98 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -824,6 +824,7 @@
static const char* result = "\xef\xbb\xbf<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
XMLTest( "BOM and default declaration", printer.CStr(), result, false );
+ XMLTest( "CStrSize", printer.CStrSize(), 42, false );
}