Refactor random_string/2

:smile: