Warning
This post was published 37 days ago. The information described in this article may have changed.
Hello,
I am working through the Rust book and there is a small exercise:
Convert strings to pig latin. The first consonant of each word is moved to the end of the word and ay is added, so first becomes irst-fay . Words that start with a vowel have hay added to the end instead (apple becomes apple-hay ).
I can only solve this with complicated case distinctions and helper functions. Is there an elegant solution? Thanks!
3 posts - 3 participants
🏷️ rust_feed