diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-05 16:01:46 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-05 16:01:46 +0000 |
| commit | 4db349c1f32b4a313d12d114137432441633d00a (patch) | |
| tree | 417451971e264834312cfd8339c79930d680a5d1 /src/util.h | |
| parent | 338e8aca09331d3e7fa4e1e8e1f9d10260986772 (diff) | |
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
columns.
* src
* test
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -16,7 +16,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * In addition, as a special exception, the copyright holders give * permission to link the code of portions of this program with the @@ -87,7 +87,7 @@ inline uint64_t hton64(uint64_t x) { return byteswap64(x); } namespace util { void split(std::pair<std::string, std::string>& hp, - const std::string& src, char delim); + const std::string& src, char delim); std::pair<std::string, std::string> split(const std::string& src, const std::string& delims); @@ -140,10 +140,10 @@ int32_t difftvsec(struct timeval tv1, struct timeval tv2); extern const std::string DEFAULT_TRIM_CHARSET; std::string trim(const std::string& src, - const std::string& trimCharset = DEFAULT_TRIM_CHARSET); + const std::string& trimCharset = DEFAULT_TRIM_CHARSET); void trimSelf(std::string& str, - const std::string& trimCharset = DEFAULT_TRIM_CHARSET); + const std::string& trimCharset = DEFAULT_TRIM_CHARSET); bool startsWith(const std::string& target, const std::string& part); @@ -216,7 +216,7 @@ void parsePrioritizePieceRange std::string getContentDispositionFilename(const std::string& header); std::string randomAlpha(size_t length, - const SharedHandle<Randomizer>& randomizer); + const SharedHandle<Randomizer>& randomizer); std::string toUpper(const std::string& src); @@ -293,7 +293,7 @@ std::string joinPath(InputIterator first, InputIterator last) for(;first != last; ++first) { if(*first == "..") { if(!elements.empty()) { - elements.pop_back(); + elements.pop_back(); } } else if(*first == ".") { // do nothing @@ -317,7 +317,7 @@ std::map<size_t, std::string> createIndexPathMap(std::istream& i); */ template<typename OutputIterator> OutputIterator split(const std::string& src, OutputIterator out, - const std::string& delims, bool doTrim = false) + const std::string& delims, bool doTrim = false) { std::string::size_type p = 0; while(1) { @@ -325,11 +325,11 @@ OutputIterator split(const std::string& src, OutputIterator out, if(np == std::string::npos) { std::string term = src.substr(p); if(doTrim) { - term = util::trim(term); + term = util::trim(term); } if(!term.empty()) { - *out = term; - ++out; + *out = term; + ++out; } break; } |
