diff options
author | Max Kellermann <max@duempel.org> | 2015-03-02 21:48:37 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-03-02 21:48:37 +0100 |
commit | 87a8a3e22f7d25c88c344cd195bde58d237716a0 (patch) | |
tree | 1541669084b0586e2cfb1e82143fecba803b8a06 /src/fs/Path.hxx | |
parent | e9125ef8e4fc42ba123aa71b5aed6f7e8d05f103 (diff) | |
download | mpd-87a8a3e22f7d25c88c344cd195bde58d237716a0.tar.gz mpd-87a8a3e22f7d25c88c344cd195bde58d237716a0.tar.xz mpd-87a8a3e22f7d25c88c344cd195bde58d237716a0.zip |
PlaylistFile: move memchr() call to class Path
Diffstat (limited to '')
-rw-r--r-- | src/fs/Path.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fs/Path.hxx b/src/fs/Path.hxx index 8126a668a..962518896 100644 --- a/src/fs/Path.hxx +++ b/src/fs/Path.hxx @@ -123,6 +123,16 @@ public: } /** + * Does the path contain a newline character? (Which is + * usually rejected by MPD because its protocol cannot + * transfer newline characters). + */ + gcc_pure + bool HasNewline() const { + return strchr(value, '\n') != nullptr; + } + + /** * Convert the path to UTF-8. * Returns empty string on error or if this instance is "nulled" * (#IsNull returns true). |