Compare a variable with a part of a String

I know I can do for example

IF(${CALLERIDNUM} = “something”)

but I would like to be able to only compare the 3 first digit of the calleridnum. There is certainly a way to do this in the diaplan.

Anyone do something like this before or could point me in the right direction ?

Found the solution in README.variables