Mid, Left & Right functions for Strings in Cerberus X

It’s beginning to be late night, but I want share these with you.

Many of you probably remember Mid, Left and Right functions for strings in basic programming languages.

  • Mid returns from given position x amount of chars
  • Left returns from left x amount of chars
  • Right returns from right x amount of chars

These are easy to implement in Cerberus X, since it has nice string slicing methods.

Implementation for Mid:

Implementation for Left:

Implementation for Right:

You can test these for example with print Mid(“This is String”,5,2).

That’s it for tonight..

Font Class for my Font 2 PNG’s fonts in Cerberus X

My studies keep me really busy and tired… Still, I’m working on Cerberus X version of Easy Math Challenge, because there seems to be problem with sound in Monkey2 with 64-bit compilations for Android.

Anyway, here’s direct implementation (earlier I did this for Monkey X) of font class to use with fonts made in my Font 2 PNG for Cerberus X.

The source (the code is directly from my Cerberus X editor, but highlighting isn’t quite right):

I’m a bit lost for words, but if you find my “poor man’s Font 2 PNG” useful, feel free to use this code.