Asking for Swift solution


I'm looking for someone who has plenty of experience in the Swift programming language.

I have some task, which I hope will be added to Rosetta Code.
This task is based on pqmarkup, and is called pqmarkup-lite.

The specialty of this task is formatting characters of pqmarkup {paired quotation marks themselves, and Н, Р, С, Т, О, which allow both Latin and Cyrillic writing} go beyond ASCII. This significantly complicates working with input UTF-8 string directly (especially in languages [like C++] which have no built-in UTF-8 support).

I've already translated the original implementation in Python of this task into C++ (there are two implementations: using u16string and using UTF-8 string).
Also there is a Nim translation by Luc Secouard.

And now I'm looking for people who can translate this task into other languages (Swift, Rust, D, etc.), and then I will compare all implementations by code readability and by performance.

So, can someone provide the most idiomatic Swift solution to this task?
I can pay for that (not very much though).

Actually, I already have a Swift translation, but it's performance is too low (see this my comment). So, can somebody help to optimize it or to implement a solution for this task from scratch?

(Also please read this comment before starting.)

Terms of Service

Privacy Policy

Cookie Policy