Different behaviour between Enketo and WebForm calculating substring-after()

After switching from Enketo to Webforms with a form in use I encounter an error in WebForm with a calculation containing substring-after().

${unite_agricole_code} = KES-100-DAF2
Enketo: substring-after(${unite_agricole_code}, '-DAF') = 2
WebForm: substring-after(${unite_agricole_code}, '-DAF') = DAF2

The result of the calculation in Enketo (2) corresponds to what is expected. This seems to be an error in WebForm. I did not test substring-before()

Looks like a bug in Web Forms to me. I've sent it on to the team and they'll report back with what they find.

Thank you for reporting the issue (tracked here). We are already working on a solution, which will be available in the next Central release. I didn't find any issues with substring-before().