Tracks
/
Julia
Julia
/
Exercises
/
Reverse String
Reverse String

Reverse String

Easy

Instructions

Reverse a string

For example: input: "cool" output: "looc"

Bonus

Preserve grapheme clusters, i.e.

myreverse("hi 👋🏾") == "👋🏾 ih"
myreverse("as⃝df̅") == "f̅ds⃝a"

You will probably find the Unicode stdlib useful for this bonus task.

To enable the graphemes test, add const TEST_GRAPHEMES = true to the global scope of your file.

Bonus

Preserve grapheme clusters, i.e.

myreverse("hi 👋🏾") == "👋🏾 ih"
myreverse("as⃝df̅") == "f̅ds⃝a"

You will probably find the Unicode stdlib useful for this bonus task.

To enable the graphemes test, add const TEST_GRAPHEMES = true to the global scope of your file.

Last updated 1 February 2023
Edit via GitHub The link opens in a new window or tab
Julia Exercism

Ready to start Reverse String?

Sign up to Exercism to learn and master Julia with 52 exercises, and real human mentoring, all for free.