/*************************************************************
*
* (c) 1999, 2000 Christoph Pinkel
* This is part of the VisKProg project.
*
* You may use it under the terms of the GPL licence.
* See COPYING for more details!
*
**************************************************************/

#include "prfilter.h"

QString prfilter::oneLine( QString str )
{
QString ret;

	ret = str.replace( QRegExp("\n"), "\\012" );

	return ret;
}

QString prfilter::mLines(QString str )
{
QString ret;

	ret = str.replace( QRegExp("\\\\012"), "\n" );

	return ret;
}


QString prfilter::encodeQs( QString str )
{
QString ret;

	ret = str.replace( QRegExp("\""), "\\042" );

	return ret;
}

QString prfilter::decodeQs(QString str )
{
QString ret;

	ret = str.replace( QRegExp("\\\\042"), "\"" );

	return ret;
}
