+ JACK host: implemented Save/Save as...; Open not implemented yet - who could possibly want THAT?

This commit is contained in:
Krzysztof Foltman
2009-12-29 00:20:30 +00:00
committed by Tobias Doerffel
parent c16949e308
commit 059fbab252
2 changed files with 8 additions and 0 deletions

View File

@@ -147,6 +147,9 @@ extern std::string f2s(double value);
/// float-to-string-that-doesn't-resemble-an-int
extern std::string ff2s(double value);
/// Encode a key-value pair as XML attribute
std::string to_xml_attr(const std::string &key, const std::string &value);
/// Escape a string to be used in XML file
std::string xml_escape(const std::string &src);

View File

@@ -69,6 +69,11 @@ std::string xml_escape(const std::string &src)
return dest;
}
std::string to_xml_attr(const std::string &key, const std::string &value)
{
return " " + key + "=\"" + xml_escape(value) + "\"";
}
std::string load_file(const std::string &src)
{
std::string str;