This function takes a string as input and rearranges words in the string so that they are sorted alphabetically.

rearrange_string(str)

Arguments

str

A character string containing words separated by underscores.

Value

A character string with the words sorted alphabetically and separated by underscores.