13
0

explanatory comment about use of g_strncasecmp()

git-svn-id: svn://localhost/ardour2/branches/3.0@9840 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-07-11 19:20:26 +00:00
parent 1d17d43751
commit 676542dcce

View File

@ -565,6 +565,13 @@ string_is_affirmative (const std::string& str)
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()));
}