strxfrm in Vala

Here, let me save you some time: string.collate_key.

I spent hours trying to get Posix.strxfrm to work and still failed. It was actually so much easier to write a simple strxfrm wrapper in C and use it as an external function. While admiring my work on this wrapper, I found GLib’s g_utf8_collate_key, which in Vala translates to the aforementioned string.collate_key.

By the way, I’ve just realised that strxfrm stands for string transform.

Note: By commenting, you grant me permission to freely republish your comment.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.