Right now, findattr(id, col, val) coerces both val and the value found in the col attribute to strings and compares those for case-insensitive equality.
We've come across situations where character sheets are inconsistent in how they represent equivalent values – e.g. 1 vs true.
Make findattr()'s value matching more semantic by coercing the attribute's value to the reference value's type (e.g. bool if true is given, number if 1 is given, else case-insensitive string) instead of coercing both to string.
Right now,
findattr(id, col, val)
coerces bothval
and the value found in thecol
attribute to strings and compares those for case-insensitive equality.We've come across situations where character sheets are inconsistent in how they represent equivalent values – e.g.
1
vstrue
.Make
findattr()
's value matching more semantic by coercing the attribute's value to the reference value's type (e.g. bool iftrue
is given, number if1
is given, else case-insensitive string) instead of coercing both to string.