Add ws_builtin_cmd_substr implementation