SHOW:
|
|
- or go back to the newest paste.
| 1 | - | def add_len(string): |
| 1 | + | std::string add_len(std::string sub, std::string buf = "") |
| 2 | - | result = '' |
| 2 | + | {
|
| 3 | - | for w in split(string, ' '): |
| 3 | + | return "" + ( std::getline(sub, buf) ? buf + " " + std::stoi(buf.size()) + add_len(sub) : "" ); |
| 4 | - | result += w + ' ' + to_string( len(w) ) |
| 4 | + | } |