mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 05:31:14 -03:00
Migrate some more off of al_list
This commit is contained in:
11
common.cpp
11
common.cpp
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user