split函数

$PBExportHeader$uf_stringsplit.srf
global type uf_stringsplit from function_object
end type
forward prototypes
global function integer uf_stringsplit (string astr_str, string astr_split, ref string astr_rtn[])
end prototypes
global function integer uf_stringsplit (string astr_str, string astr_split, ref string astr_rtn[]);//--------------------------
//split函数
//--------------------------
string ls_temp_content,ls_temp_split
long li_pos,m,li_split_len,li_pos1
//ls_temp_content=astr_str
ls_temp_split=astr_split
li_split_len=len(ls_temp_split)
do while astr_str<>''
M+=1
li_pos=pos(astr_str,ls_temp_split)
if li_pos=0 then
astr_rtn[M]=astr_str
astr_str=""
else
astr_rtn[M]=left(astr_str,li_pos - 1)
end if
astr_str=right(astr_str,len(astr_str) - li_pos - li_split_len + 1)
loop
return 0
end function

你可能感兴趣的:(split)