diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-12 11:45:40 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-12 11:45:40 +0000 |
commit | d6051c9953ea8778399ad72fc91c334c242d25e0 (patch) | |
tree | 34c9725486c0c7b9242c8b645aa2e4290218273a /libs/ardour/utils.cc | |
parent | 81a76cc0fdf569e96697c4cea58debb74d6e5545 (diff) |
move string_is_affirmative() into libpbd
git-svn-id: svn://localhost/ardour2/branches/3.0@11936 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r-- | libs/ardour/utils.cc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 4933cd7e5c..beb003e713 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -627,26 +627,6 @@ bool_as_string (bool yn) return (yn ? "yes" : "no"); } -bool -string_is_affirmative (const std::string& str) -{ - /* to be used only with XML data - not intended to handle user input */ - - if (str.empty ()) { - return false; - } - - /* the use of g_strncasecmp() is solely to get around issues with - * charsets posed by trying to use C++ for the same - * comparison. switching a std::string to its lower- or upper-case - * version has several issues, but handled by default - * in the way we desire when doing it in C. - */ - - return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length())) || - (!g_strncasecmp(str.c_str(), "true", str.length())); -} - const char* native_header_format_extension (HeaderFormat hf, const DataType& type) { |