96 lines
2.3 KiB
C++
96 lines
2.3 KiB
C++
/***********************************************************************************/
|
|
/** \file StringHelper.h
|
|
** \brief Header File zur Klasse StringHelper
|
|
*************************************************************************************
|
|
** Autor: Christian Roesch
|
|
*************************************************************************************
|
|
** _tut nichts_
|
|
**
|
|
*//*********************************************************************************/
|
|
|
|
#ifndef _StringHelper_H
|
|
#define _StringHelper_H
|
|
|
|
// includes
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
// Klassen-Deklaration
|
|
|
|
namespace FrameWork
|
|
{
|
|
|
|
/***********************************************************************************/
|
|
/** \brief StringHelper _tut nichts_
|
|
*************************************************************************************
|
|
** Genau genommen _tut dies nichts_
|
|
**
|
|
*//*********************************************************************************/
|
|
|
|
class StringHelper
|
|
{
|
|
public:
|
|
static bool splitAt(
|
|
std::string& strInput,
|
|
std::string strSeperator,
|
|
std::string& strOutput );
|
|
|
|
static bool trim(
|
|
std::string& strData,
|
|
std::vector< char >& WhiteSpaces );
|
|
|
|
static bool trim(
|
|
std::string& strData,
|
|
char cWhiteSpace );
|
|
|
|
static bool trimFront(
|
|
std::string& strData,
|
|
std::vector< char >& WhiteSpaces );
|
|
|
|
static bool trimFront(
|
|
std::string& strData,
|
|
char cWhiteSpace );
|
|
|
|
static bool trimBack(
|
|
std::string& strData,
|
|
std::vector< char >& WhiteSpaces );
|
|
|
|
static bool trimBack(
|
|
std::string& strData,
|
|
char cWhiteSpace );
|
|
|
|
static void toUpper( std::string& strData );
|
|
|
|
static int searchAndRreplace(
|
|
const std::string &strSearchString,
|
|
const std::string &strReplaceString,
|
|
std::string& strData);
|
|
|
|
struct StringHelperPreparer
|
|
{
|
|
StringHelperPreparer()
|
|
{
|
|
StringHelper::m_SpaceTab.push_back( ' ' );
|
|
StringHelper::m_SpaceTab.push_back( '\t' );
|
|
}
|
|
};
|
|
|
|
static std::vector< char >& getSpaceTab();
|
|
protected:
|
|
|
|
private:
|
|
static StringHelperPreparer m_shpDummy;
|
|
static std::vector< char > m_SpaceTab;
|
|
};
|
|
|
|
}
|
|
|
|
#endif//_StringHelper_H
|
|
|
|
class FrameWork::StringHelper;
|
|
|
|
|
|
/************************************************************************************
|
|
** Ende der Datei: StringHelper.h
|
|
************************************************************************************/
|