'Almighty_Trim'에 해당되는 글 1건

  1. 2010.06.20 공백제거 문자열 trim에서.. almighty_trim
Powerbuilder2010. 6. 20. 19:18
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

Posted by Julyus