zoukankan      html  css  js  c++  java
  • 字符串替换

    $PBExportHeader$uf_replace.srf
    global type uf_replace from function_object
    end type
    forward prototypes
    global function string uf_replace (string astr_str, string astr_old, string astr_new)
    end prototypes
    global function string uf_replace (string astr_str, string astr_old, string astr_new);string old_str, new_str, mystring
    long start_pos=1
    mystring = astr_str
    old_str = astr_old
    new_str = astr_new
    start_pos = Pos(mystring, old_str, start_pos)
    DO WHILE start_pos > 0
        mystring = Replace(mystring, start_pos, Len(old_str), new_str)
        start_pos = Pos(mystring, old_str,start_pos+Len(new_str))
    LOOP
    return mystring
    end function
  • 相关阅读:
    uva-321-暴力枚举-隐式图搜索
    uva-704-暴力枚举-双向bfs
    整数的无符号编码和有符号编码
    HDU 5793
    HDU 5730
    HDU 5740
    HDU 5768
    HDU 1194
    HDU 1086
    HDU 5145
  • 原文地址:https://www.cnblogs.com/kuailewangzi1212/p/2001059.html
Copyright © 2011-2022 走看看