* splitColumn */
| 836 | * splitColumn |
| 837 | */ |
| 838 | void CsvTable::splitColumn(table_index_t column, std::string splitStr) { |
| 839 | if( column < 0 || column >= getNumberCols() ) { |
| 840 | return; |
| 841 | } |
| 842 | addCol(column); // new column to the right |
| 843 | updateInternals(); |
| 844 | size_t R = getNumberRows(); |
| 845 | for( size_t row = 0; row < R; ++row ) { |
| 846 | std::vector<std::string> tokens = Helper::splitString(splitStr, getCell(row,column), 1); |
| 847 | setCell(tokens[0], row, column); |
| 848 | if( tokens.size() > 1 ) { |
| 849 | setCell(tokens[1], row, column+1); |
| 850 | } |
| 851 | } |
| 852 | } |
| 853 | |
| 854 | |
| 855 | /** |