exercism/elixir/german-sysadmin/HINTS.md

2.5 KiB

Hints

General

1. Sanitize existing usernames by removing everything but lowercase letters

  • Use recursion to iterate over a charlist.
  • There is a built-in function that allows us to compare a given value against many patterns.
  • There is a special syntax for getting a character's code point. It can be used in guards.
  • Charlists are lists of code points, and code points, being numbers, can be compared to one another.
  • Lowercase Latin letters all have consecutive code points, in alphabetical order.
  • There is a built-in function that allows you to concatenate two lists.

2. Allow underscores

  • There is a special syntax for getting a character's code point. It can be used in guards and it works for punctuation characters too.
  • There is a built-in function that allows you to concatenate two lists.

3. Substitute German characters

  • There is a special syntax for getting a character's code point. It can be used in guards and it works for non-Latin letters too.
  • There is a built-in function that allows you to concatenate two lists.