diff --git a/frontend/src/ts/test/funbox/funbox-functions.ts b/frontend/src/ts/test/funbox/funbox-functions.ts index 7430c0b6bae6..8736db5357c4 100644 --- a/frontend/src/ts/test/funbox/funbox-functions.ts +++ b/frontend/src/ts/test/funbox/funbox-functions.ts @@ -348,7 +348,15 @@ const list: Partial> = { }, backwards: { alterText(word: string): string { - return word.split("").reverse().join(""); + let chars; + if ("Segmenter" in Intl) { + const segmenter = new Intl.Segmenter(); + const segments = segmenter.segment(word); + chars = [...segments].map((segment) => segment.segment); + } else { + chars = [...word]; + } + return chars.reverse().join(""); }, }, capitals: {