Skip to content

Instantly share code, notes, and snippets.

@hassanRsiddiqi
Created December 31, 2020 15:55
Show Gist options
  • Save hassanRsiddiqi/131e967f1368205902505370f54da586 to your computer and use it in GitHub Desktop.
Save hassanRsiddiqi/131e967f1368205902505370f54da586 to your computer and use it in GitHub Desktop.
Convert string into List.
you can use ~W or ~w to convert strings into list.
~w"""
...> the
...> cat
...> sat
...> """
# ["the", "cat", "sat"]
str = "This is Test String" # "This is Test String"
~w<#{str}> # ["This", "is", "Test", "String"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment