Skip to content

Instantly share code, notes, and snippets.

@BrooklinJazz
Last active June 8, 2021 00:02
Show Gist options
  • Select an option

  • Save BrooklinJazz/aa987e42cf3fdf912d83363cd55c349b to your computer and use it in GitHub Desktop.

Select an option

Save BrooklinJazz/aa987e42cf3fdf912d83363cd55c349b to your computer and use it in GitHub Desktop.
String Elixir examples
String.length "a string" # 8
String.contains?("string", "str") # true
String.at("mystring", 2) # s
String.slice("mystring", 2, 3)
String.split("my string", " ") # ["my", "string"]
String.reverse("string") # gnirts
String.upcase("string") # STRING
String.downcase("STRING") # string
String.capitalize("string") # "String"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment