Main MRPT website > C++ reference for MRPT 1.9.9
Functions
String Allocation/Free functions

Detailed Description

Collaboration diagram for String Allocation/Free functions:

Functions

XMLDLLENTRY XMLSTR stringDup (XMLCSTR source, int cbData=-1)
 Duplicate (copy in a new allocated buffer) the source string. More...
 
XMLDLLENTRY void freeXMLString (XMLSTR t)
 to free the string allocated inside the "stringDup" function or the "createXMLString" function. More...
 

Function Documentation

◆ freeXMLString()

XMLDLLENTRY void freeXMLString ( XMLSTR  t)

to free the string allocated inside the "stringDup" function or the "createXMLString" function.

Definition at line 28 of file xmlParser.cpp.

◆ stringDup()

XMLDLLENTRY XMLSTR stringDup ( XMLCSTR  source,
int  cbData = -1 
)

Duplicate (copy in a new allocated buffer) the source string.

This is a very handy function when used with all the "XMLNode::*_WOSD" functions (xmlWOSD).

Parameters
cbDataIf !=0 then cbData is the number of chars to duplicate. New strings allocated with this function should be free'd using the "freeXMLString" function.

Definition at line 860 of file xmlParser.cpp.

References mrpt::system::os::memcpy(), XMLCHAR, XMLSTR, and xstrlen().

Referenced by XMLNode::addAttribute(), XMLNode::addChild(), XMLNode::addClear(), XMLNode::addText(), XMLNode::createXMLTopNode(), XMLNode::deepCopy(), XMLNode::getChildNodeByPath(), XMLNode::parseClearTag(), XMLNode::ParseXMLElement(), XMLNode::updateAttribute(), XMLNode::updateAttribute_WOSD(), XMLNode::updateClear(), XMLNode::updateName(), and XMLNode::updateText().

Here is the call graph for this function:
Here is the caller graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019