100-days-of-rust/Week-09/Day-57_Magic-Sigil-Generator
2023-03-23 21:38:35 -04:00
..
README.md Add files via upload 2023-03-23 21:38:35 -04:00

Magic Sigil Generator

A magic sigil is a glyph which represents a desire one wishes to manifest in their lives. There are many ways to create a sigil, but the most common is to write out a specific desire (e.g. "I HAVE WONDERFUL FRIENDS WHO LOVE ME"), remove all vowels, remove any duplicate letters (keeping the last occurence), and then design a glyph from what remains.

Using the sentence above as an example, we would remove duplicate letters:

AUFRINDSWHLOVME

And then remove all vowels, leaving us with:

FRNDSWHLVM

Create a function that takes a string and removes its vowels and duplicate letters. The returned string should not contain any spaces and be in uppercase.

Examples

sigilize("i am healthy") ➞ "MLTHY"

sigilize("I FOUND MY SOULMATE") ➞ "FNDYSLMT"

sigilize("I have a job I enjoy and it pays well") ➞ "HVBJNDTPYSWL"

Notes

  • For duplicate letters the last one is kept.