global type f_almighty_trim from function_object
end type
forward prototypes
global function string f_almighty_trim (string as_str, string as_target, string as_data)
end prototypes
global function string f_almighty_trim (string as_str, string as_target, string as_data);long start_pos=1
String ls_replace ,new_str,old_str
ls_replace = as_Str
start_pos = Pos(as_Str, as_target, start_pos)
DO WHILE start_pos > 0
ls_replace = Replace(ls_replace, start_pos, Len(as_target), as_data)
start_pos = Pos(ls_replace, as_target, start_pos+Len(as_data))
LOOP
return ls_replace
end function