$PBExportHeader$f_replace_string_ws.srf global type f_replace_string_ws from function_object end type forward prototypes global function string f_replace_string_ws (string arg_sorstr, string arg_objstr, string arg_replstr) end prototypes global function string f_replace_string_ws (string arg_sorstr, string arg_objstr, string arg_replstr); string ls_str,obj_str obj_str=arg_sorstr long obj_si,ls_cnt=500 obj_si=pos(obj_str,arg_objstr) do while obj_si>0 and ls_cnt>0 obj_str=replace(obj_str,obj_si,len(arg_objstr),arg_replstr) obj_si=pos(obj_str,arg_objstr) ls_cnt=ls_cnt - 1 loop return obj_str end function