http://www.conitec.net/beta/str_setchr.htm

The parameters for str_setchr() are in the wrong order.

It should be
str_setchr (STRING* string, var pos, var char)
instead of
str_setchr (STRING* string, var char, var pos)