/[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 3561 by schoenebeck, Fri Aug 23 11:44:00 2019 UTC revision 3708 by schoenebeck, Wed Jan 8 22:11:30 2020 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 - 2019 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2020 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 111  inline float ToFloat(const std::string& Line 111  inline float ToFloat(const std::string&
111  }  }
112    
113  inline std::string ltrim(std::string s) {  inline std::string ltrim(std::string s) {
114      s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));      s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) {
115            return !std::isspace(ch);
116        }));
117      return s;      return s;
118  }  }
119    
120  inline std::string rtrim(std::string s) {  inline std::string rtrim(std::string s) {
121      s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());      s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) {
122            return !std::isspace(ch);
123        }).base(), s.end());
124      return s;      return s;
125  }  }
126    

Legend:
Removed from v.3561  
changed lines
  Added in v.3708

  ViewVC Help
Powered by ViewVC