Tag Archives: vala

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.

GIO tutorial: Launching files

In this short tutorial we’ll look at several ways we can use GIO to launch (or “open”) files.

Note: This article is part of my ongoing GIO tutorial series, which currently consists of: (1) File and path operations; (2) File IO; and (3) Launching files (this document).

Continue reading