Remove boost::algorithm

parent e5bfd4da
......@@ -26,10 +26,9 @@
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
#include <boost/algorithm/string.hpp>
namespace filesystem = walberla::filesystem;
bool verbose;
......@@ -51,7 +50,7 @@ namespace walberla{
int main(int argc, char** argv)
{
if( argc == 1 || boost::equals(argv[1], "-h" ) ){
if( argc == 1 || std::string(argv[1]) == "-h" ){
PRINT_DEF( "Usage: PovrayFileCompressor [OPTIONS] <inDir> <outDir>\n"
<< "compresses povray mesh2 files mode\n"
<< "OPTIONS (optional):\n -h help\n -q quiet: no output\n -v verbose: most output\n -n number of vertices per mesh\n -s number of unconnected meshes beginning with biggest mest\n -o maximum distance between two vertices to be merged" )
......@@ -69,15 +68,15 @@ int main(int argc, char** argv)
if( argc > 3 ) {
for( walberla::uint_t i = 1; i < walberla::uint_c(argc-2); ++i ) {
if( boost::equals(argv[i], "-q" ) )
if( std::string(argv[i]) == "-q" )
quiet = true;
else if( boost::equals(argv[i], "-v" ) )
else if( std::string(argv[i]) == "-v" )
verbose = true;
else if( boost::equals(argv[i], "-n" ) )
else if( std::string(argv[i]) == "-n" )
n = walberla::numeric_cast< size_t >( atoi( argv[++i] ) );
else if( boost::equals(argv[i], "-s" ) )
else if( std::string(argv[i]) == "-s" )
s = walberla::numeric_cast< size_t >( atoi( argv[++i] ) );
else if( boost::equals(argv[i], "-o" ) )
else if( std::string(argv[i]) == "-o" )
o = walberla::real_c( atof( argv[++i] ) );
else if( argv[i][0] != '-' )
PRINT_ERR( "Usage: PovrayFileCompressor [-q|-v] <inDir> <outDir>\n" )
......
......@@ -33,9 +33,7 @@
#include "core/mpi/Reduce.h"
#include "core/timing/Timer.h"
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/trim.hpp>
#include "core/StringUtility.h"
#include <array>
#include <vector>
......@@ -305,8 +303,8 @@ bool DynamicParMetis::operator()( std::vector< std::pair< const PhantomBlock *,
DynamicParMetis::Algorithm DynamicParMetis::stringToAlgorithm( std::string s )
{
boost::algorithm::to_upper( s );
boost::algorithm::trim( s );
string_to_upper( s );
string_trim( s );
if( s == "PART_GEOM_KWAY" )
return PARMETIS_PART_GEOM_KWAY;
......@@ -325,8 +323,8 @@ DynamicParMetis::Algorithm DynamicParMetis::stringToAlgorithm( std::string s )
DynamicParMetis::WeightsToUse DynamicParMetis::stringToWeightsToUse( std::string s )
{
boost::algorithm::to_upper( s );
boost::algorithm::trim( s );
string_to_upper( s );
string_trim( s );
if( s == "NO_WEIGHTS" )
return PARMETIS_NO_WEIGHTS;
......@@ -343,8 +341,8 @@ DynamicParMetis::WeightsToUse DynamicParMetis::stringToWeightsToUse( std::string
DynamicParMetis::EdgeSource DynamicParMetis::stringToEdgeSource( std::string s )
{
boost::algorithm::to_upper( s );
boost::algorithm::trim( s );
string_to_upper( s );
string_trim( s );
if( s == "EDGES_FROM_FOREST" )
return PARMETIS_EDGES_FROM_FOREST;
......
......@@ -33,8 +33,7 @@
#include "core/timing/Timer.h"
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/trim.hpp>
#include "core/StringUtility.h"
namespace walberla {
namespace blockforest {
......@@ -204,8 +203,8 @@ uint_t StaticLevelwiseParMetis::operator()( SetupBlockForest & forest, const uin
StaticLevelwiseParMetis::Algorithm StaticLevelwiseParMetis::stringToAlgorithm( std::string s )
{
boost::algorithm::to_upper( s );
boost::algorithm::trim( s );
string_to_upper( s );
string_trim( s );
if( s == "PART_GEOM_KWAY" )
return PARMETIS_PART_GEOM_KWAY;
......@@ -218,8 +217,8 @@ StaticLevelwiseParMetis::Algorithm StaticLevelwiseParMetis::stringToAlgorithm( s
StaticLevelwiseParMetis::WeightsToUse StaticLevelwiseParMetis::stringToWeightsToUse( std::string s )
{
boost::algorithm::to_upper( s );
boost::algorithm::trim( s );
string_to_upper( s );
string_trim( s );
if( s == "NO_WEIGHTS" )
return PARMETIS_NO_WEIGHTS;
......
......@@ -32,6 +32,7 @@
#include "blockforest/loadbalancing/StaticCurve.h"
#include "core/logging/Logging.h"
#include "core/StringUtility.h"
#include "domain_decomposition/StructuredBlockStorage.h"
#include "python_coupling/Manager.h"
#include "python_coupling/helper/ConfigFromDict.h"
......@@ -40,7 +41,6 @@
#include "stencil/D3Q19.h"
#include "stencil/D3Q27.h"
#include <boost/algorithm/string.hpp>
#include <sstream>
#ifdef _MSC_VER
......@@ -246,11 +246,11 @@ shared_ptr<StructuredBlockForest> createStructuredBlockForest( Vector3<uint_t> b
object createUniformNeighborScheme( const shared_ptr<StructuredBlockForest> & bf,
const std::string & stencil )
{
if ( boost::iequals(stencil, "D3Q7") )
if ( string_icompare(stencil, "D3Q7") == 0 )
return object ( make_shared< UniformBufferedScheme<stencil::D3Q7> > ( bf ) );
if ( boost::iequals(stencil, "D3Q19") )
if ( string_icompare(stencil, "D3Q19") == 0 )
return object ( make_shared< UniformBufferedScheme<stencil::D3Q19> > ( bf ) );
if ( boost::iequals(stencil, "D3Q27") )
if ( string_icompare(stencil, "D3Q27") == 0 )
return object ( make_shared< UniformBufferedScheme<stencil::D3Q27> > ( bf ) );
else {
PyErr_SetString( PyExc_RuntimeError, "Unknown stencil. Allowed values 'D3Q27', 'D3Q19', 'D3Q7'");
......
......@@ -27,11 +27,10 @@
#include "core/logging/Logging.h"
#include "core/logging/Tracing.h"
#include "core/mpi/MPIManager.h"
#include "core/StringUtility.h"
#include "core/uid/GlobalState.h"
#include "core/uid/SUID.h"
#include <boost/algorithm/string.hpp>
#include <algorithm>
#include <functional>
#include <sstream>
......@@ -82,8 +81,7 @@ void configureGlobalState( const shared_ptr<Config> & config ) {
std::string suids = config->getParameter< std::string >( "GlobalState" );
std::vector< std::string > states;
boost::split( states, suids, boost::is_any_of(", \t") );
std::vector< std::string > states = string_split( suids, ", \t" );
states.erase( std::remove_if( states.begin(), states.end(), std::bind( &std::string::empty, std::placeholders::_1 ) ), states.end() );
Set<SUID> state;
......
......@@ -22,9 +22,9 @@
#pragma once
#include "core/DataTypes.h"
#include "core/StringUtility.h"
#include <sstream>
#include <boost/algorithm/string.hpp>
namespace boost {
......@@ -53,8 +53,7 @@ bool parseArray1D( std::vector<T> & arr, std::istream & is,
return false;
std::vector<std::string> stringArr;
boost::split( stringArr,line, boost::is_any_of( delimiter ), boost::token_compress_on );
std::vector<std::string> stringArr = walberla::string_split( line, delimiter );
arr.clear();
arr.reserve( stringArr.size() );
......
//======================================================================================================================
//
// This file is part of waLBerla. waLBerla is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// waLBerla is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
//! \file StringUtility.h
//! \ingroup core
//! \author Christoph Schwarzmeier <christoph.schwarzmeier@fau.de>
//
//======================================================================================================================
#pragma once
#include <algorithm>
#include <cctype>
#include <string>
#include <vector>
namespace walberla
{
// Convert (in place) every character in string to uppercase.
inline void string_to_upper(std::string &s);
// Convert (copy) every character in string to uppercase.
inline std::string string_to_upper_copy(const std::string &s);
// Convert (in place) every character in string to lowercase.
inline void string_to_lower(std::string &s);
// Convert (in place) every character in string to lowercase.
inline std::string string_to_lower_copy(const std::string &s);
// Remove (in place) all whitespaces at the beginning of a string.
inline void string_trim_left(std::string &s);
// Remove (in place) all whitespaces at the end of a string.
inline void string_trim_right(std::string &s);
// Remove (in place) all whitespaces at the beginning and at the end of a string.
inline void string_trim(std::string &s);
// Remove (copy) all whitespaces at the beginning of a string.
inline std::string string_trim_left_copy(const std::string &s);
// Remove (copy) all whitespaces at the end of a string.
inline std::string string_trim_right_copy(const std::string &s);
// Remove (copy) all whitespaces at the beginning and at the end of a string.
inline std::string string_trim_copy(const std::string &s);
// Split a string at the given delimiters into a vector of substrings.
// E.g. specify std::string(" |,") in order to split at characters ' ' and ','.
inline std::vector<std::string> string_split(std::string s, const std::string &delimiters);
// Replace (in place) all occurrences of substring "old" with substring "new".
inline void string_replace_all(std::string &s, const std::string &oldSubstr, const std::string &newSubstr);
// Replace (copy) all occurrences of substring "old" with substring "new".
inline std::string string_replace_all_copy(const std::string &s, const std::string &oldSubstr, const std::string &newSubstr);
// Check whether a string ends with a certain substring.
inline bool string_ends_with(const std::string &s, const std::string &substr);
// Case-insensitive std::string::compare.
inline int string_icompare(const std::string &s1, const std::string &s2);
} // namespace walberla
#include "core/StringUtility.impl.h"
\ No newline at end of file
//======================================================================================================================
//
// This file is part of waLBerla. waLBerla is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// waLBerla is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
//! \file StringUtility.impl.h
//! \ingroup core
//! \author Christoph Schwarzmeier <christoph.schwarzmeier@fau.de>
//
//======================================================================================================================
#pragma once
#include "core/StringUtility.h"
#include <algorithm>
#include <cctype>
#include <string>
#include <vector>
namespace walberla
{
// Convert (in place) every character in string to uppercase.
inline void string_to_upper(std::string &s) {
std::transform(s.begin(), s.end(), s.begin(), [](char c){ return static_cast<char>(std::toupper(static_cast<unsigned char>(c))); });
}
// Convert (copy) every character in string to uppercase.
inline std::string string_to_upper_copy(const std::string &s) {
std::string result = s;
string_to_upper(result);
return result;
}
// Convert (in place) every character in string to lowercase.
inline void string_to_lower(std::string &s) {
std::transform(s.begin(), s.end(), s.begin(), [](char c){ return static_cast<char>(std::tolower(static_cast<unsigned char>(c))); });
}
// Convert (copy) every character in string to lowercase.
inline std::string string_to_lower_copy(const std::string &s) {
std::string result = s;
string_to_lower(result);
return result;
}
// Remove (in place) all whitespaces at the beginning of a string.
inline void string_trim_left(std::string &s) {
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](char c) { return ! std::isspace(static_cast<unsigned char>(c)); }));
}
// Remove (in place) all whitespaces at the end of a string.
inline void string_trim_right(std::string &s) {
s.erase(std::find_if(s.rbegin(), s.rend(), [](char c) { return ! std::isspace(static_cast<unsigned char>(c)); }).base(), s.end());
}
// Remove (in place) all whitespaces at the beginning and at the end of a string.
inline void string_trim(std::string &s) {
string_trim_left(s);
string_trim_right(s);
}
// Remove (copy) all whitespaces at the beginning of a string.
inline std::string string_trim_left_copy(const std::string &s) {
std::string result = s;
string_trim_left(result);
return result;
}
// Remove (copy) all whitespaces at the end of a string.
inline std::string string_trim_right_copy(const std::string &s) {
std::string result = s;
string_trim_left(result);
return result;
}
// Remove (copy) all whitespaces at the beginning and at the end of a string.
inline std::string string_trim_copy(const std::string &s) {
std::string result = s;
string_trim_left(result);
return result;
}
// Split a string at the given delimiters into a vector of substrings.
// E.g. specify std::string(" ,") in order to split at characters ' ' and ','.
inline std::vector<std::string> string_split(std::string s, const std::string &delimiters) {
std::vector<std::string> substrings;
auto sub_begin = s.begin(); // iterator to the begin and end of a substring
auto sub_end = sub_begin;
for (auto it = s.begin(); it != s.end(); ++it) {
for (auto d : delimiters) {
if (*it == d) { // current character in s is a delimiter
sub_end = it;
if (sub_begin < sub_end) { // make sure that the substring is not empty
substrings.push_back(std::string(sub_begin, sub_end));
}
sub_begin = ++sub_end;
continue;
}
}
}
// add substring from last delimiter to the end of s
if (sub_begin < s.end()) {
substrings.push_back(std::string(sub_begin, s.end()));
}
return substrings;
}
// Replace (in place) all occurrences of substring "old" with substring "new".
inline void string_replace_all(std::string &s, const std::string &oldSubstr, const std::string &newSubstr) {
// loop written to avoid infinite-loops when newSubstr contains oldSubstr
for (size_t pos = s.find(oldSubstr); pos != std::string::npos;) {
s.replace(pos, oldSubstr.length(), newSubstr);
pos = s.find(oldSubstr, pos + newSubstr.length());
}
}
// Replace (copy) all occurrences of substring "old" with substring "new".
inline std::string string_replace_all_copy(const std::string &s, const std::string &oldSubstr, const std::string &newSubstr) {
std::string result = s;
string_replace_all(result, oldSubstr, newSubstr);
return result;
}
// Check whether a string ends with a certain substring.
inline bool string_ends_with(const std::string &s, const std::string &substr) {
return s.rfind(substr) == (s.length() - substr.length());
}
// Case-insensitive wrapper for std::string::compare (return values as for std::string::compare).
inline int string_icompare(const std::string &s1, const std::string &s2) {
// function std::string::compare returns 0 in case of equality => invert result to obtain expected bool behavior
return string_to_lower_copy(s1).compare(string_to_lower_copy(s2));
}
} // namespace walberla
......@@ -29,6 +29,7 @@
#include "Deprecated.h"
#include "EndianIndependentSerialization.h"
#include "Environment.h"
#include "FunctionTraits.h"
#include "GetPID.h"
#include "Hostname.h"
#include "Macros.h"
......@@ -39,6 +40,7 @@
#include "Set.h"
#include "SharedFunctor.h"
#include "Sleep.h"
#include "StringUtility.h"
#include "VectorTrait.h"
#include "cell/all.h"
......
......@@ -22,13 +22,12 @@
#include "Config.h"
#include "core/mpi/MPIManager.h"
#include "core/StringUtility.h"
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <boost/algorithm/string/trim.hpp>
namespace walberla {
namespace config {
......@@ -247,7 +246,7 @@ void Config::parseFromFile( const char* filename, Block& block, unsigned int lev
getLineNumber( lineNumbers, input.tellg() ), level );
}
else if( boost::algorithm::iequals( key, "include" ) )
else if( string_icompare( key, "include" ) == 0 )
{
if( std::getline( input, value, ';' ) && !input.eof() )
{
......@@ -362,7 +361,7 @@ void Config::extractBlock( const char* filename, std::stringstream& input, Block
while( input >> key )
{
if( boost::algorithm::iequals( key, "}" ) ) {
if( string_icompare( key, "}" ) == 0 ) {
return;
}
else if( input >> std::ws && input.eof() ) {
......@@ -380,7 +379,7 @@ void Config::extractBlock( const char* filename, std::stringstream& input, Block
getLineNumber( lineNumbers, input.tellg() ), level );
}
else if( boost::algorithm::iequals( key, "include" ) )
else if( string_icompare( key, "include" ) == 0 )
{
if( std::getline( input, value, ';' ) && !input.eof() )
{
......@@ -515,7 +514,7 @@ Config::size_type Config::Block::getNumBlocks( const std::string& key ) const
{
size_type c = 0;
for( List::const_iterator it=blocks_.begin(); it!=blocks_.end(); ++it ) {
if( boost::algorithm::iequals( key, it->getKey() ) ) {
if( string_icompare( key, it->getKey() ) == 0 ) {
++c;
}
}
......@@ -569,7 +568,7 @@ void Config::Block::getBlocks( const std::string& key, Blocks& blocks, size_t mi
{
size_t c = 0;
for( List::const_iterator it=blocks_.begin(); it!=blocks_.end(); ++it ) {
if( boost::algorithm::iequals( key, it->getKey() ) ) {
if( string_icompare( key, it->getKey() ) == 0 ) {
blocks.push_back( BlockHandle( &*it ) );
++c;
}
......@@ -627,7 +626,7 @@ void Config::Block::getWritableBlocks( const std::string & key, std::vector<Bloc
{
size_t c = 0;
for( List::iterator it=blocks_.begin(); it!=blocks_.end(); ++it ) {
if( boost::algorithm::iequals( key, it->getKey() ) ) {
if( string_icompare( key, it->getKey() ) == 0 ) {
blocks.push_back( &*it );
++c;
}
......@@ -735,7 +734,7 @@ static void printConfig( std::ostream & os, const Config::BlockHandle & block, i
if ( depth >=0 )
{
std::string blockName = block.getKey();
boost::algorithm::trim( blockName );
string_trim( blockName );
os << prefix.str() << blockName << "\n";
os << prefix.str() << "{\n";
}
......@@ -746,8 +745,8 @@ static void printConfig( std::ostream & os, const Config::BlockHandle & block, i
for( auto paramIt = block.begin(); paramIt != block.end(); ++paramIt ) {
std::string key = paramIt->first;
std::string value = paramIt->second;
boost::algorithm::trim( key );
boost::algorithm::trim( value );
string_trim( key );
string_trim( value );
os << prefix.str() << " " << key << " " << value << ";\n";
}
......
......@@ -22,7 +22,9 @@
#pragma once
#include "core/Abort.h"
#include "core/Filesystem.h"
#include "core/debug/CheckFunctions.h"
#include "core/StringUtility.h"
#include <cctype>
#include <iostream>
......@@ -35,9 +37,7 @@
#include <vector>
// boost includes
#include <boost/algorithm/string/predicate.hpp>
#include "core/Filesystem.h"
......@@ -50,7 +50,7 @@ struct CaseInsensitiveCompare
{
bool operator()( const std::string & lhs, const std::string & rhs) const
{
return boost::algorithm::ilexicographical_compare(lhs, rhs);
return ( string_icompare(lhs, rhs) < 0 );
}
};
......@@ -905,17 +905,17 @@ inline Config::Parameter<bool> Config::Block::getParameter<bool>( std::string ke
if( it != params_.end() )
{
if( ( it->second.length() == 1u && it->second[0] == '1' ) ||
boost::algorithm::iequals( it->second, std::string("true") ) ||
boost::algorithm::iequals( it->second, std::string("yes") ) ||
boost::algorithm::iequals( it->second, std::string("on") ) )
if( ( it->second.length() == 1u && it->second[0] == '1' ) ||
string_icompare( it->second, std::string("true") ) == 0 ||
string_icompare( it->second, std::string("yes") ) == 0 ||
string_icompare( it->second, std::string("on") ) == 0 )
{
return Parameter<bool>( true, noerror, key );
}
else if( ( it->second.length() == 1u && it->second[0] == '0' ) ||
boost::algorithm::iequals( it->second, std::string("false") ) ||
boost::algorithm::iequals( it->second, std::string("no") ) ||
boost::algorithm::iequals( it->second, std::string("off") ) )
else if( ( it->second.length() == 1u && it->second[0] == '0' ) ||
string_icompare( it->second, std::string("false") ) == 0 ||
string_icompare( it->second, std::string("no") ) == 0 ||
string_icompare( it->second, std::string("off") ) ==0 )
{
return Parameter<bool>( false, noerror, key );
}
......
......@@ -22,11 +22,7 @@
#include "Create.h"
#include "core/logging/Tracing.h"
#include "core/Abort.h"
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/trim.hpp>
#include "core/StringUtility.h"
#include <iomanip>
......@@ -109,14 +105,10 @@ namespace config {
{
using std::vector;
using std::string;
using boost::algorithm::split;
using boost::algorithm::is_any_of;
using boost::algorithm::trim;
for( auto param = params.begin(); param != params.end(); ++param )
{
vector< string > equalitySignSplitResult;
split( equalitySignSplitResult, *param, is_any_of("=") );
vector< string > equalitySignSplitResult = string_split( *param, "=" );
std::string value;
if ( equalitySignSplitResult.size() == 0 )
......@@ -138,8 +130,7 @@ namespace config {
const std::string & blockDescriptor = equalitySignSplitResult[0];
vector< string > blocks;
split( blocks, blockDescriptor, is_any_of(".") );
vector< string > blocks = string_split( blockDescriptor, "." );
if ( blocks.empty() ) {
WALBERLA_LOG_WARNING( "Ignoring Parameter: Missing block descriptor on left hand side: '" << *param <<"'" );
......@@ -150,7 +141,7 @@ namespace config {
for( uint_t i=0; i < blocks.size() -1; ++i )
{
std::string & blockName = blocks[i];
trim( blockName );
string_trim( blockName );
if ( blockName.empty() )
{
......@@ -177,7 +168,7 @@ namespace config {
if ( ! currentBlock )
continue;
trim( blocks.back() );
string_trim( blocks.back() );
if ( blocks.back().empty() )
{
WALBERLA_LOG_WARNING( "Ignoring Parameter '" << *param << "' since key is empty");
......
......@@ -21,8 +21,7 @@
#include "Initialization.h"
#include "Logging.h"
#include <boost/algorithm/string.hpp>
#include "core/StringUtility.h"
#include <algorithm>
#include <sstream>
......@@ -42,7 +41,7 @@ static void parseIgnoreBlocks( const Config::Blocks & ignoreBlocks, std::vector<
{
std::string regexString = ignoreBlock->getParameter<std::string>( "callerPathPattern" );
// Replace slashes with a regex to allow for windows/linux compatibility
boost::algorithm::replace_all( regexString, "/", "(\\\\|/)" );
string_replace_all( regexString, "/", "(\\\\|/)" );
try
{
walberla::regex regex( regexString );
......@@ -140,7 +139,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock )
if( loggingBlock.isDefined( "logLevel" ) )
{
std::string type = loggingBlock.getParameter< std::string >( "logLevel" );
boost::algorithm::to_lower( type );
string_to_lower( type );
if( type == "warning" ){
logging::Logging::instance()->setLogLevel( logging::Logging::WARNING );
......@@ -159,7 +158,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock )
if( loggingBlock.isDefined( "streamLogLevel" ) )
{
std::string type = loggingBlock.getParameter< std::string >( "streamLogLevel" );
boost::algorithm::to_lower( type );
string_to_lower( type );
if( type == "warning" ){
logging::Logging::instance()->setStreamLogLevel( logging::Logging::WARNING );
......@@ -178,7 +177,7 @@ void configureLogging( const Config::BlockHandle & loggingBlock )
if( loggingBlock.isDefined( "fileLogLevel" ) )
{
std::string type = loggingBlock.getParameter< std::string >( "fileLogLevel" );
boost::algorithm::to_lower( type );
string_to_lower( type );
if( type == "warning" ){
logging::Logging::instance()->setFileLogLevel( logging::Logging::WARNING );
......
......@@ -29,8 +29,8 @@
#include "core/singleton/Singleton.h"
#include "core/timing/WcPolicy.h"
#include "core/Regex.h"
#include "core/StringUtility.h"
#include <boost/algorithm/string/replace.hpp>
#include <functional>
#include <cmath>
......@@ -485,7 +485,7 @@ inline std::string Logging::resetLinebreaks( const std::string & message ) const
std::string newline = std::string("\n") + getRankStamp();
newline.append( TAG_WIDTH + ( showTimeStamp_ ? TIMESTAMP_WIDTH : uint_c(0) )
+ ( additionalStamp_ ? additionalStamp_->maxStampWidth() : uint_c(0) ) + uint_c(1), ' ' );
return boost::algorithm::replace_all_copy( message, "\n", newline );
return string_replace_all_copy( message, "\n", newline );
}
......