Backend/Database/Serializable.cpp
/*!
 * @brief escape separators
 * @details escape all "separators", i.e. delimiters in the regular text, so that they aren't
 * processed as delimiters on the receiving end
 * @param item a pointer to the item to serialize (pass by reference)
 * @param size the size of the item (pass by reference)
 * @return whether or not the operation succeeded
 */
@brief escape separators
@details escape all "separators", i.e. delimiters in the regular text, so that they aren't
processed as delimiters on the receiving end
@param item a pointer to the item to serialize (pass by reference)
@param size the size of the item (pass by reference)
@return whether or not the operation succeeded
@brief escape separators @details escape all " separators " i . e . delimiters in the regular text so that they aren ' t processed as delimiters on the receiving end @param item a pointer to the item to serialize ( pass by reference ) @param size the size of the item ( pass by reference ) @return whether or not the operation succeeded
GString Serializable::escapeSeparators(const GType& serial)
{
	GString newSerial = serial;
	for (unsigned int i = 0; i < newSerial.size(); ++i)
	{
		if (Serializable::NEED_ESCAPING.cfind(newSerial[i]) == GString::npos)
			continue;
		newSerial = newSerial.substr(0, i) + Serializable::ESC_CHAR + newSerial.substr(i);
		++i;
	}
	return newSerial;
}
GString Serializable :: escapeSeparators ( const GType & serial ) { GString newSerial = serial ; for ( unsigned int i = 0 ; i < newSerial . size ( ) ; ++ i ) { if ( Serializable :: NEED_ESCAPING . cfind ( newSerial [ i ] ) == GString :: npos ) continue ; newSerial = newSerial . substr ( 0 , i ) + Serializable :: ESC_CHAR + newSerial . substr ( i ) ; ++ i ; } return newSerial ; }
@brief escape separators
 @details escape all "separators", i.e.
@brief escape separators @details escape all " separators " i . e .