2009년 7월 7일 화요일

string 특정 문자열 전부 교체

func_replace ( string str, string old_str, string new_str ) returns string

long start_pos = 1

start_pos = Pos(str, old_str, start_pos)

DO WHILE start_pos > 0

str = Replace(str, start_pos, Len(old_str), new_str)

start_pos = Pos(str, old_str, start_pos+Len(new_str))

LOOP

return str

댓글 없음:

댓글 쓰기