Migrate some more off of al_list

This commit is contained in:
ridiculousfish
2011-12-26 23:13:05 -08:00
parent b67eaa3abd
commit 9cd279e0e9
3 changed files with 22 additions and 18 deletions

View File

@@ -1765,6 +1765,17 @@ int common_get_height()
return termsize.ws_row;
}
void tokenize_variable_array2( const wcstring &val, std::vector<wcstring> &out)
{
size_t pos = 0, end = val.size();
while (pos < end) {
size_t next_pos = val.find(ARRAY_SEP, pos);
if (next_pos == wcstring::npos) next_pos = end;
out.push_back(val.substr(pos, next_pos - pos));
pos = next_pos + 1; //skip the separator
}
}
void tokenize_variable_array( const wchar_t *val, array_list_t *out )
{
if( val )