util/StringUtil: add function Strip()

Replaces g_strstrip().
This commit is contained in:
Max Kellermann
2014-02-17 22:37:43 +01:00
parent 6a08f2281a
commit 579e48edbb
5 changed files with 27 additions and 6 deletions

View File

@@ -1,4 +1,3 @@
/*
* Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
@@ -27,6 +26,7 @@
#include "ExcludeList.hxx"
#include "fs/Path.hxx"
#include "fs/FileSystem.hxx"
#include "util/StringUtil.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
@@ -58,7 +58,7 @@ ExcludeList::LoadFile(Path path_fs)
if (p != nullptr)
*p = 0;
p = g_strstrip(line);
p = Strip(line);
if (*p != 0)
patterns.emplace_front(p);
}