summaryrefslogtreecommitdiffstats
path: root/sources/strcom.cpp
blob: f885d77e97d7c67c506fc4b4f9217f0a1dc274be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-

// file strcom.cpp

#include "strcom.hpp"

namespace strcom {

  std::string toLower (const std::string &s)
  {
    std::string sTemp = s;
    //
    std::for_each (sTemp.begin (), sTemp.end (), [](char &c)
    {
      c = std::tolower (c);
    });
    return sTemp;
  }

  std::string toUpper (const std::string &s)
  {
    std::string sTemp = s;
    //
    std::for_each (sTemp.begin (), sTemp.end (), [](char &c)
    {
      c = std::toupper (c);
    });
    return sTemp;
  }

}

// end of file strcom.cpp