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

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

?? fstrrep.pas

?? 非常好用的VC++源代碼
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
    //end------------------------------------------

    // Make Al and Ah uppercase.
    and  Al, $df

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

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

    and  Ah, $df

    @CompareChar2:
    cmp  Al, Ah
    Jz   @Matches
    Mov  Al, [ESI]

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

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

    // Make Al uppercase.
    and  Al, $df
    Jmp  @NextChar
    @Matches:
    Dec  EBX
    Jnz  @CompareNext

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

    mov  EAX, EDI
    sub  EAX, aSourceString
    inc  EAX
    mov  Result, EAX
    jmp  @TheEnd
    @NextChar:
    Inc  EDI
    dec  ECX
    //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
    @Result0:
    mov  Result,0
    @TheEnd:
    pop  EBX
    pop  EDI
    pop  ESI
  end;
end;

//My move isn’t as fast as MOVE when source and destination are both DWord al
//igned, but it’s certainly faster when they’re not. As we’re moving charac
//ters in a string, it isn’t very likely at all that both source and destinat
//ion are DWord aligned, so moving bytes avoids the cycle penalty of reading/w
//riting DWords across physical boundaries.
procedure MyMove(
  const Source; var Dest; Count : Integer);
asm
// Note: When this function is called,
// Delphi passes the parameters as follows:
// ECX = Count
// EAX = Const Source
// EDX = Var Dest
  // If there are no bytes to copy, just quit
  // altogether; there's no point pushing registers.
  cmp   ECX,0
  Je    @JustQuit
  // Preserve the critical Delphi registers.
  push  ESI
  push  EDI
  // Move Source into ESI (generally the
  // SOURCE register).
  // Move Dest into EDI (generally the DEST
  // register for string commands).
  // This might not actually be necessary,
  // as I'm not using MOVsb etc.
  // I might be able to just use EAX and EDX;
  // there could be a penalty for not using
  // ESI, EDI, but I doubt it.
  // This is another thing worth trying!
  mov   ESI, EAX
  mov   EDI, EDX
  // The following loop is the same as repNZ
  // MovSB, but oddly quicker!
    @Loop:
  // Get the source byte.
  Mov   AL, [ESI]
  // Point to next byte.
  Inc   ESI
  // Put it into the Dest.
  mov   [EDI], AL
  // Point dest to next position.
  Inc   EDI
  // Dec ECX to note how many we have left to copy.
  Dec   ECX
  // If ECX <> 0, then loop.
  Jnz   @Loop
  // Another optimization note.
  // Many people like to do this.
  // Mov AL, [ESI]
  // Mov [EDI], Al
  // Inc ESI
  // Inc ESI
//There’s a hidden problem here. I won’t go into too much detail, but the Pe
//ntium can continue processing instructions while it’s still working out the
// result of INC ESI or INC EDI. If, however, you use them while they’re stil
//l being calculated, the processor will stop until they’re calculated (a pen
//alty). Therefore, I alter ESI and EDI as far in advance as possible of using
// them.
  // Pop the critical Delphi registers
  // that we've altered.
  pop   EDI
  pop   ESI
    @JustQuit:
end;

//Point 1: I pass VAR aSourceString rather than just aSourceString. This is be
//cause I’ll just be passed a pointer to the data rather than a 10M copy of t
//he data itself, which is much quicker!
function FastReplace(
  var aSourceString : String;
  const aFindString, aReplaceString : String;
  CaseSensitive : Boolean = False) : String;
var
  // Size already passed to SetLength,
  // the REAL size of RESULT.
  ActualResultLen,
  // Position of aFindString is aSourceString.
  CurrentPos,
  // Last position the aFindString was found at.
  LastPos,
  // Bytes to copy (that is, lastpos to this pos).
  BytesToCopy,
  // The "running" result length, not the actual one.
  ResultLen,
  // Length of aFindString, to save
  // calling LENGTH repetitively.
  FindLen,
  // Length of aReplaceString, for the same reason.
  ReplaceLen,
  SourceLen         : Integer;
  // This is where I explain the
  // TYPE TFastPosProc from earlier!
  FastPosProc       : TFastPosProc;
begin
//As this function has the option of being case-insensitive, I’d need to call
// either FastPOS or FastPOSNoCase. The problem is that you’d have to do this
// within a loop. This is a bad idea, since the result never changes throughou
//t the whole operation–in which case we can determine it in advance, like so
//:
  if CaseSensitive then
    FastPosProc := FastPOS
  else
    FastPOSProc := FastPOSNoCase;
  // I don't think I actually need
  // this, but I don't really mind!
  Result := '';
  // Get the lengths of the strings.
  FindLen := Length(aFindString);
  ReplaceLen := Length(aReplaceString);
  SourceLen := Length(aSourceString);
  // If we already have room for the replacements,
  // then set the length of the result to
  // the length of the SourceString.
  if ReplaceLen <= FindLen then
    ActualResultLen := SourceLen
  else
    // If not, we need to calculate the
    // worst-case scenario.
    // That is, the Source consists ONLY of
    // aFindString, and we're going to replace
    // every one of them!
    ActualResultLen :=
      SourceLen +
      (SourceLen * ReplaceLen div FindLen) +
      ReplaceLen;
  // Set the length of Result; this
  // will assign the memory, etc.
  SetLength(Result,ActualResultLen);
  CurrentPos := 1;
  ResultLen := 0;
  LastPos := 1;
//Again, I’m eliminating an IF statement in a loop by repeating code–this ap
//proach results in very slightly larger code, but if ever you can trade some
//memory in exchange for speed, go for it!
  if ReplaceLen > 0 then begin
    repeat
      // Get the position of the first (or next)
      // aFindString in aSourceString.
      // Note that there's no If CaseSensitive,
      // I just call FastPOSProc, which is pointing
      // to the correct pre-determined routine.
      CurrentPos :=
        FastPosProc(aSourceString, aFindString,
          SourceLen, FindLen, CurrentPos);
      // If 0, then we're finished.
      if CurrentPos = 0 then break;
      // Number of bytes to copy from the
      // source string is CurrentPos - lastPos,
      // i.e. " cat " in "the cat the".
      BytesToCopy := CurrentPos-LastPos;
      // Copy chars from aSourceString
      // to the end of Result.
      MyMove(aSourceString[LastPos],
        Result[ResultLen+1], BytesToCopy);
      // Copy chars from aReplaceString to
      // the end of Result.
      MyMove(aReplaceString[1],
        Result[ResultLen+1+BytesToCopy], ReplaceLen);
      // Remember, using COPY would copy all of
      // the data over and over again.
      // Never fall into this trap (like a certain
      // software company did).
      // Set the running length to
      ResultLen := ResultLen +
        BytesToCopy + ReplaceLen;
      // Set the position in aSourceString to where
      // we want to continue searching from.
      CurrentPos := CurrentPos + FindLen;
      LastPos := CurrentPos;
    until false;
  end else begin
    // You might have noticed If ReplaceLen > 0.
    // Well, if ReplaceLen = 0, then we're deleting the
    // substrings, rather than replacing them, so we
    // don't need the extra MyMove from aReplaceString.
    repeat
      CurrentPos := FastPos(aSourceString,
        aFindString, SourceLen, FindLen, CurrentPos);
      if CurrentPos = 0 then break;
      BytesToCopy := CurrentPos-LastPos;
      MyMove(aSourceString[LastPos],
        Result[ResultLen+1], BytesToCopy);
      ResultLen := ResultLen +
        BytesToCopy + ReplaceLen;
      CurrentPos := CurrentPos + FindLen;
      LastPos := CurrentPos;
    until false;
  end;
//Now that we’ve finished doing all of the replaces, I just need to adjust th
//e length of the final result:
  Dec(LastPOS);
//Now I set the length to the Length plus the bit of string left. That is, " m
//at" when replacing "the" in "sat on the mat".
  SetLength(Result, ResultLen + (SourceLen-LastPos));
  // If there's a bit of string dangling, then
  // add it to the end of our string.
  if LastPOS+1 <= SourceLen then
    MyMove(aSourceString[LastPos+1],
      Result[ResultLen+1],SourceLen-LastPos);
end;

end.

 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产成人在线影院| 欧美日本在线播放| 亚洲综合色区另类av| 欧美日韩你懂得| 美美哒免费高清在线观看视频一区二区| 在线不卡的av| 成人教育av在线| 日韩av电影天堂| 日本一区二区不卡视频| 在线观看不卡一区| 亚洲综合色成人| 精品播放一区二区| 欧美影视一区二区三区| 国产成人丝袜美腿| 亚洲一区二区三区中文字幕 | 91丝袜美腿高跟国产极品老师| 亚洲视频电影在线| 久久婷婷国产综合精品青草 | 91成人免费在线| 国产毛片精品视频| 日本午夜精品视频在线观看 | 国产精品久久久久影院老司| 91精品在线一区二区| k8久久久一区二区三区| 亚洲高清免费在线| 一区二区三区在线播放| 国产精品欧美一区喷水| 精品成人一区二区三区| 欧美一区二区三区在线看| 欧美在线小视频| 在线中文字幕一区| 欧洲精品在线观看| 亚洲主播在线观看| 久久se这里有精品| 日韩毛片在线免费观看| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美成人乱码一区二区三区| 欧美电影一区二区| 日韩女同互慰一区二区| 精品国产欧美一区二区| 久久午夜免费电影| 国产午夜亚洲精品不卡| 中文字幕精品—区二区四季| 欧美国产日韩精品免费观看| 亚洲视频精选在线| 午夜影视日本亚洲欧洲精品| 亚洲一区二区三区四区在线免费观看| 国产精品久久久久久久蜜臀| 亚洲欧美视频一区| 亚洲1区2区3区视频| 天天综合日日夜夜精品| 依依成人综合视频| 久久精品72免费观看| 懂色av一区二区三区免费看| 91网上在线视频| 777午夜精品免费视频| 精品理论电影在线观看 | 国产精品无码永久免费888| 久久麻豆一区二区| 国产精品美女一区二区在线观看| 国产精品视频麻豆| 亚洲国产wwwccc36天堂| 视频一区欧美精品| 久久精品国产免费| 久久精品亚洲精品国产欧美kt∨| 精品国产乱码久久| 一区二区三区毛片| 成人动漫在线一区| 精品美女在线观看| 免费在线成人网| fc2成人免费人成在线观看播放 | 91碰在线视频| 国产欧美综合在线| 麻豆freexxxx性91精品| 欧美日韩亚洲另类| 亚洲欧美日韩小说| 91蜜桃传媒精品久久久一区二区| 久久精品一区蜜桃臀影院| 美腿丝袜亚洲综合| 日韩欧美一区二区免费| 蜜臀精品久久久久久蜜臀| 欧美视频一区二区三区四区| 一区二区三区四区中文字幕| 成人app网站| 国产精品福利一区| 国产suv精品一区二区三区| 精品sm在线观看| 国产成人亚洲精品狼色在线 | 欧美艳星brazzers| 一区二区三区久久| 欧美日韩激情一区二区| 亚洲成人免费视频| 欧美不卡一二三| 国产a视频精品免费观看| 国产精品蜜臀在线观看| 在线观看国产精品网站| 免费人成在线不卡| 日韩欧美国产小视频| 国产麻豆日韩欧美久久| 欧美高清在线精品一区| 欧美在线制服丝袜| 日本成人中文字幕| 一区二区视频在线| 日韩精品一二三区| 精品88久久久久88久久久| 国产91在线|亚洲| 综合色天天鬼久久鬼色| 日韩av电影天堂| 色老头久久综合| 亚洲综合自拍偷拍| 精品国产乱码久久久久久夜甘婷婷| 久久99国产精品免费网站| 国产精品久久久久精k8| 欧美一区二区视频网站| 99视频超级精品| 久久超碰97中文字幕| 亚洲综合无码一区二区| 久久伊99综合婷婷久久伊| 在线欧美日韩精品| 成人免费视频视频| 亚洲免费色视频| 欧美一区二区大片| av一区二区久久| 久久精品国产色蜜蜜麻豆| 亚洲国产成人高清精品| 国产精品久久久久久久久免费樱桃| 欧美日韩国产综合久久| 色哟哟欧美精品| 91麻豆国产福利在线观看| 国产成人亚洲综合a∨婷婷图片| 日韩在线一区二区| 亚洲一本大道在线| 亚洲高清不卡在线| 一区二区在线免费观看| 亚洲猫色日本管| 国产香蕉久久精品综合网| 久久久亚洲高清| 久久久久亚洲蜜桃| 国产欧美日韩在线视频| 欧美一区二区三区四区久久| 色综合久久六月婷婷中文字幕| 成人自拍视频在线| 国产精品66部| 成人午夜电影久久影院| 不卡的av电影| 欧美日韩国产影片| 精品国产91洋老外米糕| 日韩一区二区精品葵司在线| 欧美另类久久久品| 欧美精品v国产精品v日韩精品| 欧美日韩电影在线播放| 欧美tk—视频vk| 中文字幕亚洲在| 日韩精品91亚洲二区在线观看| 久久激情五月激情| eeuss影院一区二区三区| 97精品超碰一区二区三区| 91精品欧美一区二区三区综合在| 欧美成人一区二区三区| 亚洲视频每日更新| 裸体在线国模精品偷拍| 99在线精品一区二区三区| 欧美日韩综合不卡| 国产精品国产成人国产三级| 五月天一区二区三区| 99精品视频在线播放观看| 91精品福利在线一区二区三区| 国产精品美女久久久久aⅴ | 不卡电影免费在线播放一区| 欧美午夜一区二区三区免费大片| 国产区在线观看成人精品| 午夜av电影一区| 青青草原综合久久大伊人精品| 激情图片小说一区| 欧美日韩久久久一区| 欧美福利电影网| 88在线观看91蜜桃国自产| 国产精品美女一区二区在线观看| 男人的天堂久久精品| 欧美性猛交一区二区三区精品| 亚洲欧洲日产国码二区| 国产大片一区二区| 精品国产免费一区二区三区香蕉| 午夜精品久久久久久久99水蜜桃 | 日韩女同互慰一区二区| 日韩av在线免费观看不卡| 色噜噜狠狠成人中文综合| 欧美激情一区二区三区四区| 国产一区欧美一区| 国产日韩精品一区二区浪潮av| 精品一区二区三区在线观看| 欧美成人r级一区二区三区| 麻豆精品视频在线观看免费| 欧美mv日韩mv亚洲| 亚洲一区二区三区视频在线播放| av福利精品导航| 樱桃视频在线观看一区| 国产激情视频一区二区在线观看 | 亚洲一区成人在线| 欧美一区在线视频|