Hm, there is actually a function `FourCharCodeFromString` which I didn't see before. Now I wonder if it's not worth updating it to taking an `MCStringRef` and an initial position. That would replace all the pieces of code like the ones above - which was intended with  `mcstring_to_four_char_code`. Including a range would avoid to create substrings for each case.