1.3 KiB
1.3 KiB
Hints
General
- Browse the functions available in the string module to discover which operations on strings Gleam's standard library offers.
1. Get the name's first letter
- There is a function to get the first character from a string.
- There are multiple functions to remove leading, trailing, or leading and trailing whitespaces from a string.
2. Format the first letter as an initial
- There is a function to convert all characters in a string to their uppercase variant.
- The
<>operator can be used to concatenate strings.
3. Split the full name into the first name and the last name
- There is a function that splits a string on whitespace characters.
- A few first elements of a list can be assigned to variables by pattern matching on the list.
4. Put the initials inside of the heart
- The
<>operator can be used to concatenate strings.