123456789101112131415161718192021222324252627 |
- $PBExportHeader$f_pb_split.srf
- global type f_pb_split from function_object
- end type
- forward prototypes
- global function integer f_pb_split (string arg_source, string arg_symbol, ref string arg_returnstr[])
- end prototypes
- global function integer f_pb_split (string arg_source, string arg_symbol, ref string arg_returnstr[]);
- string ls_cmd,ls_arg[]
- long i, li_argcnt = 1
- ls_cmd=trim(arg_source)
- DO WHILE Len(ls_cmd) > 0
- i = Pos( ls_cmd, arg_Symbol)
- IF i = 0 THEN i = Len(ls_cmd) + 1
- ls_arg[li_argcnt] = Left(ls_cmd, i - 1)
- li_argcnt = li_argcnt + 1
- ls_cmd = Replace(ls_cmd, 1, i, "")
- LOOP
- arg_returnstr=ls_arg
- return upperbound(ls_arg)
- end function
|