sort_substr: sort substrings
Description
unify code for substrings and arrange, after tokenizing
Usage
sort_substr(x, list_substr)
Arguments
list_substr
list of substrings to match against and sort -
the order in the list defines the resulting order in the string
Should be names list - the names will be the codes to which the
tokens will be matched against.