diff options
Diffstat (limited to 'src/fs/Path.hxx')
-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). |