Add support CSS color text for class nana::color

This commit is contained in:
cnjinhao
2015-02-06 01:45:17 +08:00
parent fd5ff571a7
commit 81a50fd84f
6 changed files with 267 additions and 19 deletions

View File

@@ -343,12 +343,7 @@ namespace nana
erase_n = str.size() - offset;
//If there is not a parameter for %argNNN, the %argNNN will be erased.
//a workaround, MinGW does not provide std::stoi
std::wstringstream ss;
std::size_t arg;
ss<<str.substr(offset + 4, arg_n);
ss>>arg;
std::size_t arg = static_cast<std::size_t>(::nana::stoi(str.substr(offset + 4, arg_n)));
if (arg_strs && arg < arg_strs->size())
str.replace(offset, erase_n, (*arg_strs)[arg]);