/[svn]/linuxsampler/trunk/src/common/global_private.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/global_private.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2600 by schoenebeck, Sat Jun 7 00:16:03 2014 UTC revision 2885 by schoenebeck, Fri Apr 22 15:37:45 2016 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2013 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2016 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 30  Line 30 
30  #include "global.h"  #include "global.h"
31  #include "Exception.h"  #include "Exception.h"
32  #include <sstream>  #include <sstream>
33    #include <algorithm>
34    #include <math.h>
35    
36  #if HAVE_CONFIG_H  #if HAVE_CONFIG_H
37  # include <config.h>  # include <config.h>
# Line 104  inline float ToFloat(const std::string& Line 106  inline float ToFloat(const std::string&
106      return i;      return i;
107  }  }
108    
109    inline std::string ltrim(std::string s) {
110        s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
111        return s;
112    }
113    
114    inline std::string rtrim(std::string s) {
115        s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
116        return s;
117    }
118    
119    inline std::string trim(std::string s) {
120        return ltrim(rtrim(s));
121    }
122    
123  class Runnable {  class Runnable {
124      public:      public:
125          virtual ~Runnable() { }          virtual ~Runnable() { }

Legend:
Removed from v.2600  
changed lines
  Added in v.2885

  ViewVC Help
Powered by ViewVC