| 1 | 
< | 
 /* | 
| 1 | 
> | 
/* | 
| 2 | 
  | 
 * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. | 
| 3 | 
  | 
 * | 
| 4 | 
  | 
 * The University of Notre Dame grants you ("Licensee") a | 
| 42 | 
  | 
#include "utils/Trim.hpp" | 
| 43 | 
  | 
namespace oopse { | 
| 44 | 
  | 
 | 
| 45 | 
< | 
void trimLeft(std::string& str) { | 
| 45 | 
> | 
  void trimLeft(std::string& str) { | 
| 46 | 
  | 
    trimLeftIf(str, std::isspace); | 
| 47 | 
< | 
} | 
| 47 | 
> | 
  } | 
| 48 | 
  | 
 | 
| 49 | 
< | 
void trimRight(std::string& str) { | 
| 49 | 
> | 
  void trimRight(std::string& str) { | 
| 50 | 
  | 
    trimRightIf(str, std::isspace); | 
| 51 | 
< | 
} | 
| 51 | 
> | 
  } | 
| 52 | 
  | 
 | 
| 53 | 
< | 
void trim(std::string& str) { | 
| 53 | 
> | 
  void trim(std::string& str) { | 
| 54 | 
  | 
    trimIf(str, std::isspace); | 
| 55 | 
< | 
} | 
| 55 | 
> | 
  } | 
| 56 | 
  | 
 | 
| 57 | 
< | 
std::string trimLeftCopy(const std::string& input) { | 
| 57 | 
> | 
  std::string trimLeftCopy(const std::string& input) { | 
| 58 | 
  | 
    return trimLeftCopyIf(input, std::isspace); | 
| 59 | 
< | 
} | 
| 59 | 
> | 
  } | 
| 60 | 
  | 
 | 
| 61 | 
< | 
std::string trimRightCopy(const std::string& input) { | 
| 61 | 
> | 
  std::string trimRightCopy(const std::string& input) { | 
| 62 | 
  | 
    return trimRightCopyIf(input, std::isspace); | 
| 63 | 
< | 
} | 
| 63 | 
> | 
  } | 
| 64 | 
  | 
 | 
| 65 | 
< | 
std::string trimCopy(const std::string& input) { | 
| 65 | 
> | 
  std::string trimCopy(const std::string& input) { | 
| 66 | 
  | 
    return trimCopyIf(input, std::isspace); | 
| 67 | 
< | 
} | 
| 67 | 
> | 
  } | 
| 68 | 
  | 
 | 
| 69 | 
  | 
} |