~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/src/numbercleaner.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
#define INVALID_CHAR " -()"
36
36
 
37
 
namespace {
38
 
void strip_chars(const std::string &to_strip, std::string &num)
 
37
static void
 
38
strip_chars(const std::string &to_strip, std::string &num)
39
39
{
40
40
    for (const auto &item : to_strip)
41
41
        num.erase(std::remove(num.begin(), num.end(), item), num.end());
42
42
}
43
 
}
44
43
 
45
44
std::string NumberCleaner::clean(std::string to_clean, const std::string &prefix)
46
45
{
55
54
      strip_chars(INVALID_CHAR, high);
56
55
      return high+to_clean.substr(pos+1);
57
56
   }
58
 
 
59
57
}