zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    Mutex和RWMutex
    内核态和用户态
    runtime源码
    goroutine的结束与通信
    进程线程协程
    堆和栈
    array和slice区别
    逃逸分析
    单例模式
    WaitGroup用法
  • 原文地址:https://www.cnblogs.com/kuailewangzi1212/p/2001061.html
Copyright © 2011-2022 走看看