亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fstrrep.pas

?? 非常好用的VC++源代碼
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
{其實還可以在FastReplace中先對FindStr進行判斷,如果
FindStr完全是中文的話,直接可以在FastReplace中用
FastPos,這樣可以提高速度。}

unit fStrRep;

interface

Type
  TFastPosProc = function(
    const aSourceString, aFindString : String;
    const aSourceLen, aFindLen, StartPos : integer
    ) : integer;

function FastReplace(
  var aSourceString : String;
  const aFindString, aReplaceString : String;
  CaseSensitive : Boolean = False) : String;

function FastPos(
  const aSourceString, aFindString : String;
  const aSourceLen, aFindLen, StartPos : integer
  ) : integer;

function FastPosNoCase(
  const aSourceString, aFindString : String;
  const aSourceLen, aFindLen, StartPos : integer
  ) : integer;

implementation

// This TYPE declaration will become apparent later.
//The first thing to note here is that I’m passing the SourceLength and FindL
//ength. As neither Source nor Find will alter at any point during FastReplace
//, there’s no need to call the LENGTH subroutine each time!
function FastPos(
  const aSourceString, aFindString : String;
  const aSourceLen, aFindLen, StartPos : integer
  ) : integer;
var
  SourceLen : integer;
begin
  // Next, we determine how many bytes we need to
  // scan to find the "start" of aFindString.
  SourceLen := aSourceLen;
  SourceLen := SourceLen - aFindLen;
  if (StartPos-1) > SourceLen then begin
    Result := 0;
    Exit;
  end;
  SourceLen := SourceLen - StartPos;
  SourceLen := SourceLen +2;
  // The ASM starts here.
  asm
    // Delphi uses ESI, EDI, and EBX a lot,
    // so we must preserve them.
    push ESI
    push EDI
    push EBX
    // Get the address of sourceString[1]
    // and Add (StartPos-1).
    // We do this for the purpose of finding
    // the NEXT occurrence, rather than
    // always the first!
    mov EDI, aSourceString
    add EDI, StartPos
    Dec EDI
    // Get the address of aFindString.
    mov ESI, aFindString
    // Note how many bytes we need to
    // look through in aSourceString
    // to find aFindString.
    mov ECX, SourceLen
    // Get the first char of aFindString;
    // note how it is done outside of the
    // main loop, as it never changes!
    Mov  Al, [ESI]
    // Now the FindFirstCharacter loop!
    @ScaSB:
    // Get the value of the current
    // character in aSourceString.
    // This is equal to ah := EDI^, that
    // is what the [] are around [EDI].
    Mov  Ah, [EDI]
    // Compare this character with aDestString[1].
    cmp  Ah,Al
    // If they're not equal we don't
    // compare the strings.
    jne  @NextChar
    // If they're equal, obviously we do!
    @CompareStrings:
    // Put the length of aFindLen in EBX.
    mov  EBX, aFindLen
    // We DEC EBX to point to the end of
    // the string; that is, we don't want to
    // add 1 if aFindString is 1 in length!
    dec  EBX

    // add by ShengQuanhu
    // If EBX is zero, then we've successfully
    // compared each character; i.e. it's A MATCH!
    // It will be happened when aFindLen=1
    Jz @EndOfMatch
    //add end

//Here’s another optimization tip. People at this point usually PUSH ESI and
//so on and then POP ESI and so forth at the end–instead, I opted not to chan
//ge ESI and so on at all. This saves lots of pushing and popping!
    @CompareNext:
    // Get aFindString character +
    // aFindStringLength (the last char).
    mov  Al, [ESI+EBX]
    // Get aSourceString character (current
    // position + aFindStringLength).
    mov  Ah, [EDI+EBX]
    // Compare them.
    cmp  Al, Ah
    Jz   @Matches
    // If they don't match, we put the first char
    // of aFindString into Al again to continue
    // looking for the first character.
    Mov  Al, [ESI]
    Jmp  @NextChar
    @Matches:
    // If they match, we DEC EBX (point to
    // previous character to compare).
    Dec  EBX
    // If EBX <> 0 ("J"ump "N"ot "Z"ero), we
    // continue comparing strings.
    Jnz  @CompareNext

    //add by Shengquanhu
    @EndOfMatch:
    //add end

    // If EBX is zero, then we've successfully
    // compared each character; i.e. it's A MATCH!
    // Move the address of the *current*
    // character in EDI.
    // Note, we haven't altered EDI since
    // the first char was found.
    mov  EAX, EDI
    // This is an address, so subtract the
    // address of aSourceString[1] to get
    // an actual character position.
    sub  EAX, aSourceString
    // Inc EAX to make it 1-based,
    // rather than 0-based.
    inc  EAX
    // Put it into result.
    mov  Result, EAX
    // Finish this routine!
    jmp  @TheEnd
    @NextChar:
//This is where I jump to when I want to continue searching for the first char
//acter of aFindString in aSearchString:
    // Point EDI (aFindString[X]) to
    // the next character.
    Inc  EDI
    // Dec ECX tells us that we've checked
    // another character, and that we're
    // fast running out of string to check!
    dec  ECX
    // If EBX <> 0, then continue scanning
    // for the first character.

    //add by shengquanhu
    //if ah is chinese char,jump again
    jz   @Result0
    cmp  ah, $80
    jb   @ScaSB
    Inc  EDI
    Dec  ECX
    //add by shengquanhu end

    jnz  @ScaSB

    //add by shengquanhu
    @Result0:
    //add by shengquanhu end

    // If EBX = 0, then move 0 into RESULT.
    mov  Result,0
    // Restore EBX, EDI, ESI for Delphi
    // to work correctly.
    // Note that they're POPped in the
    // opposite order they were PUSHed.
    @TheEnd:
    pop  EBX
    pop  EDI
    pop  ESI
  end;
end;

//This routine is an identical copy of FastPOS except where commented! The ide
//a is that when grabbing bytes, it ANDs them with $df, effectively making the
//m lowercase before comparing. Maybe this would be quicker if aFindString was
// made lowercase in one fell swoop at the beginning of the function, saving a
//n AND instruction each time.
function FastPosNoCase(
  const aSourceString, aFindString : String;
  const aSourceLen, aFindLen, StartPos : integer
  ) : integer;
var
  SourceLen : integer;
begin
  SourceLen := aSourceLen;
  SourceLen := SourceLen - aFindLen;
  if (StartPos-1) > SourceLen then begin
    Result := 0;
    Exit;
  end;
  SourceLen := SourceLen - StartPos;
  SourceLen := SourceLen +2;
  asm
    push ESI
    push EDI
    push EBX

    mov EDI, aSourceString
    add EDI, StartPos
    Dec EDI
    mov ESI, aFindString
    mov ECX, SourceLen
    Mov  Al, [ESI]

    //add by shengquanhu:just modified the lowercase 'a'..'z'
    cmp Al, $7A
    ja @ScaSB

    cmp Al, $61
    jb @ScaSB
    //end------------------------------------------

    // Make Al uppercase.
    and  Al, $df

    @ScaSB:
    Mov  Ah, [EDI]

    //add by shengquanhu:just modified the lowercase 'a'..'z'
    cmp Ah, $7A
    ja @CompareChar

    cmp Ah, $61
    jb @CompareChar
    //end------------------------------------------

    // Make Ah uppercase.
    and  Ah, $df

    @CompareChar:
    cmp  Ah,Al
    jne  @NextChar
    @CompareStrings:
    mov  EBX, aFindLen
    dec  EBX

    //add by ShengQuanhu
    Jz   @EndOfMatch
    //add end

    @CompareNext:
    mov  Al, [ESI+EBX]
    mov  Ah, [EDI+EBX]

    //add by shengquanhu:just modified the lowercase 'a'..'z'
    cmp Ah, $7A
    ja @LowerAh

    cmp Al, $61
    jb @LowerAh

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲综合| 国产精品久久久久国产精品日日 | wwww国产精品欧美| 国产欧美精品在线观看| 中文字幕中文字幕中文字幕亚洲无线| 亚洲电影视频在线| 国产精品视频在线看| 久久精品噜噜噜成人av农村| 在线观看不卡一区| 中文字幕一区二区三区视频| 国产精品一卡二卡在线观看| 日韩欧美一区二区三区在线| 午夜精品久久久久久不卡8050| va亚洲va日韩不卡在线观看| 久久香蕉国产线看观看99| 亚洲第一久久影院| 欧美日韩综合在线| 亚洲成av人**亚洲成av**| 欧美午夜精品久久久| 亚洲精品菠萝久久久久久久| 色婷婷综合五月| 视频一区二区三区入口| 日韩一本二本av| 国产麻豆视频一区| 国产人成一区二区三区影院| 成人午夜激情视频| 亚洲综合色成人| 制服丝袜亚洲精品中文字幕| 国产在线精品国自产拍免费| 国产欧美一区二区在线| 99精品1区2区| 五月婷婷综合在线| 久久久三级国产网站| 国产精品一二三四| 亚洲一区二三区| 久久免费视频一区| 91黄色激情网站| 免费不卡在线观看| 中国色在线观看另类| 欧美日韩国产电影| 99精品国产99久久久久久白柏| 首页国产欧美久久| 国产精品拍天天在线| 欧美一级淫片007| 91国产丝袜在线播放| 日韩高清一级片| 国产区在线观看成人精品 | 国产精品中文字幕一区二区三区| 国产日韩欧美不卡在线| 99久久伊人精品| 午夜精品在线视频一区| 4438x成人网最大色成网站| 美国欧美日韩国产在线播放| 国产精品久久久久天堂| 欧美另类久久久品| 成人激情开心网| 国产成人精品影院| 国模一区二区三区白浆| 欧美aaa在线| 三级欧美韩日大片在线看| 一区二区欧美在线观看| 亚洲丝袜美腿综合| 中文字幕日本乱码精品影院| 成人午夜电影久久影院| 国产成人av一区二区三区在线| 日韩av高清在线观看| 日产欧产美韩系列久久99| 性欧美疯狂xxxxbbbb| 亚洲国产欧美在线| 同产精品九九九| 日韩电影一区二区三区| 美腿丝袜亚洲色图| 精品亚洲porn| 懂色av一区二区三区免费看| a在线欧美一区| 91麻豆免费观看| 欧美日韩久久久久久| 日韩三级伦理片妻子的秘密按摩| 日韩免费福利电影在线观看| 精品国产精品网麻豆系列| 91精品国产品国语在线不卡| 精品对白一区国产伦| 国产精品麻豆久久久| 五月天网站亚洲| 奇米精品一区二区三区四区| 夜色激情一区二区| 亚洲国产色一区| 麻豆一区二区在线| 午夜精品成人在线视频| 亚洲一区二区欧美| 免费成人av资源网| 成人理论电影网| 色综合视频在线观看| 欧美午夜在线观看| 欧美成人精品1314www| 亚洲欧美一区二区在线观看| 丝袜脚交一区二区| 97精品久久久久中文字幕 | www.亚洲激情.com| 日韩欧美的一区| 日日夜夜一区二区| 91在线一区二区| 国产精品理论在线观看| 国产一区二区在线影院| 欧美一区二区人人喊爽| 亚洲女人的天堂| heyzo一本久久综合| 亚洲欧洲精品天堂一级| 成人理论电影网| 亚洲国产成人一区二区三区| 国内一区二区视频| 欧美不卡123| 国产精品亚洲第一区在线暖暖韩国 | 亚洲美女在线国产| 色综合天天综合网国产成人综合天| 国产日韩精品一区二区三区| 精品一区二区免费在线观看| 欧美tk丨vk视频| 国产精品一区久久久久| 国产日产精品一区| 99久久精品国产网站| 欧美高清在线精品一区| 图片区日韩欧美亚洲| 99久久婷婷国产精品综合| ...xxx性欧美| 色婷婷av一区二区三区gif| 亚洲高清视频在线| 51精品久久久久久久蜜臀| 国产精品一区一区三区| 国产精品久久看| 69久久夜色精品国产69蝌蚪网| 亚洲444eee在线观看| 国产欧美精品国产国产专区| 97精品久久久午夜一区二区三区 | 日韩国产欧美在线视频| 久久久精品天堂| 欧美中文字幕一二三区视频| 国产在线一区观看| 亚洲资源在线观看| 国产丝袜欧美中文另类| 欧美亚洲国产一区二区三区| 国产精品一二三四区| 亚洲图片一区二区| 国产精品色哟哟| 日韩美女视频在线| 91久久精品一区二区| 国产一区二区三区在线观看免费视频 | 2023国产一二三区日本精品2022| 成人免费av在线| 久久er精品视频| 一区二区三区.www| 亚洲美女一区二区三区| 中文子幕无线码一区tr| 国产欧美日本一区视频| 久久无码av三级| 日韩一区二区免费在线电影| 欧美午夜片在线观看| 99久久精品国产导航| 不卡的av电影在线观看| 成人激情免费电影网址| 岛国精品在线观看| 成人av在线看| 成熟亚洲日本毛茸茸凸凹| 国产精品一区二区在线观看网站| 亚洲国产精品久久艾草纯爱| 国产精品九色蝌蚪自拍| 精品国产乱码久久久久久夜甘婷婷| 91麻豆精品久久久久蜜臀| 欧美一区二区三区四区五区 | 热久久免费视频| 久久国产欧美日韩精品| 精品一区二区三区免费毛片爱| 亚洲国产精品欧美一二99| 奇米影视一区二区三区| 国产美女精品人人做人人爽| 99久久99久久久精品齐齐| 欧美日韩在线播放一区| 欧美tickling网站挠脚心| 中文字幕中文字幕中文字幕亚洲无线| 亚洲国产成人午夜在线一区| 亚洲特黄一级片| 视频一区免费在线观看| 国产一区二区0| 色伊人久久综合中文字幕| 欧美男人的天堂一二区| 国产亚洲精品超碰| 偷拍一区二区三区| 成人99免费视频| 欧美一区二区三区视频免费| 国产午夜精品一区二区 | 国产精品电影一区二区| 久久99精品国产麻豆婷婷洗澡| 欧美一区国产二区| 亚洲一区二区四区蜜桃| 国产精品一区二区果冻传媒| 精品国产91九色蝌蚪| 男女男精品网站| 日韩一级二级三级精品视频| 午夜精品久久久久久久久久久| 色综合视频在线观看|