After having 5+ years of X++ experience, I finally realized that the relational operator 'like' might equally well be used outside of select-statements, just like this:

static void testLike(Args _args)

{

    str someString;

    ;

   

    someString = "Johnny";

 

    if (someString like "Joh?ny" || someString like "*ny")

    {

        info("Dammit, I should have known this before!");

    }

}

It looks very much like I don't need Global::strStartsWith() and Global::strEndsWith() methods anymore...