Vassal v3.4.12
Attempt to use substring fails when the object string is length less than the specified 2nd parameter in the substring expression:
Example error generated:- Expression evaluation error {name.substring(0,21)}
In the example, this workaround resolves the issue: {name.substring(0,Math.min(name.length(),21))}
Also, when the 1st parameter is non-zero, the substring returns null. Observed when trying to use the following example...
Role.substring(1,1) where Role was a dynamic property of various lengths >2. Role.substring(0,1) worked fine in the same example.