| 7 | #define DBG(text) std::cout << text << std::endl |
| 8 | |
| 9 | std::string mask_string(const std::string &p_content, const std::string &p_mask) |
| 10 | { |
| 11 | size_t end = p_content.size(); |
| 12 | end = p_mask.size() < end ? p_mask.size() : end; |
| 13 | |
| 14 | std::string ret; |
| 15 | |
| 16 | for (int pos = 0; pos < end; ++pos) |
| 17 | { |
| 18 | if (p_mask[pos] != ' ') |
| 19 | { |
| 20 | ret += p_content[pos]; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | return ret; |
| 25 | } |
| 26 | |
| 27 | int main() |
| 28 | { |