diff --git a/LFSToolKit/ChangeLog b/LFSToolKit/ChangeLog index 70e4c2b..27f688e 100644 --- a/LFSToolKit/ChangeLog +++ b/LFSToolKit/ChangeLog @@ -1,4 +1,5 @@ 0.6.1 +Set default whitespace for LFSTK_strStrip. Renoved some leaky glib code. Updated LFSTK_strStrip whitespace to include \n & \r. Removing old 'c' code ... diff --git a/LFSToolKit/LFSToolKit/lfstk/LFSTKUtilityClass.cpp b/LFSToolKit/LFSToolKit/lfstk/LFSTKUtilityClass.cpp index a30e9d0..baa897a 100644 --- a/LFSToolKit/LFSToolKit/lfstk/LFSTKUtilityClass.cpp +++ b/LFSToolKit/LFSToolKit/lfstk/LFSTKUtilityClass.cpp @@ -81,9 +81,8 @@ std::string LFSTK_UtilityClass::LFSTK_strStr(std::string haystack,std::string ne return(""); } -std::string LFSTK_UtilityClass::LFSTK_strStrip(std::string haystack) +std::string LFSTK_UtilityClass::LFSTK_strStrip(std::string haystack,std::string whitespace) { - std::string whitespace="\t \r\n"; std::string::size_type foundfront; std::string::size_type foundback; diff --git a/LFSToolKit/LFSToolKit/lfstk/LFSTKUtilityClass.h b/LFSToolKit/LFSToolKit/lfstk/LFSTKUtilityClass.h index 656c531..7adf554 100644 --- a/LFSToolKit/LFSToolKit/lfstk/LFSTKUtilityClass.h +++ b/LFSToolKit/LFSToolKit/lfstk/LFSTKUtilityClass.h @@ -29,7 +29,7 @@ class LFSTK_UtilityClass static std::vector LFSTK_strTok(std::string str,std::string delimiter); static std::string LFSTK_strStr(std::string haystack,std::string needle,bool caseinsensitive=false); - static std::string LFSTK_strStrip(std::string haystack); + static std::string LFSTK_strStrip(std::string haystack,std::string whitespace="\t \r\n"); }; #endif diff --git a/LFSToolKit/examples/basic.cpp b/LFSToolKit/examples/basic.cpp index fde9a3b..a9799d9 100755 --- a/LFSToolKit/examples/basic.cpp +++ b/LFSToolKit/examples/basic.cpp @@ -147,13 +147,13 @@ bool gadgetDrop(void *lwc,propertyStruct *data,void* ud) while(std::getline(stream,line)) { c=LFSTK_UtilityClass::LFSTK_strStrip(line); - std::cerr<<"dropped '"<LFSTK_getLabel()<<"' @x/y "<dropX<<" "<dropY<LFSTK_getLabel()<<"' @x/y "<dropX<<" "<dropY<data); - std::cerr<<"dropped '"<LFSTK_getLabel()<<"' @x/y "<dropX<<" "<dropY<LFSTK_getLabel()<<"' @x/y "<dropX<<" "<dropY<