Fix str-slice
function to work with utf8 strings
#1047
Merged
str-slice
function to work with utf8 strings
#1047