Re: New function's UpperCase / LowerCase
- From: "Lars G" <lbg-at-aplusmail-dot-dk>
- Date: Tue, 28 Nov 2006 19:02:57 +0100
Hi Jouni
Thank you for building the release.
Regards,
Lars
(*
Author: Lars Bloch Gravengaard
Date: 27/11 2006
Instructionset(s): PAS
Function size 72 bytes
*)
function UpperCase_LBG_Pas_2_a(const S: string): string;
const a=1;
var
Max, CharNo : Cardinal;
pResult : PChar;
begin
Max := Length(S);
SetLength(Result, Max);
if Max <= 0 then exit;
pResult := pointer(Result);
CharNo := 0;
repeat
pResult[CharNo] := S[CharNo+a];
if (S[CharNo+a] >= 'a') and (S[CharNo+a] <= 'z') then
pResult[CharNo] := char(Ord(S[CharNo+a]) - 32);
Inc(CharNo);
until(CharNo >= Max);
end;
(*
Author: Lars Bloch Gravengaard
Date: 27/11 2006
Instructionset(s): PAS
Function size 75
*)
function UpperCase_LBG_Pas_3_a(const S: string): string;
const a=1;
var
Max, CharNo : Cardinal;
pResult : PChar;
begin
Max := Length(S);
SetLength(Result, Max);
if Max <= 0 then exit;
pResult := pointer(Result);
CharNo := 0;
repeat
pResult[CharNo] := S[CharNo+a];
if (S[CharNo+a] in ['a'..'z']) then
pResult[CharNo] := char(Ord(S[CharNo+a]) - 32);
Inc(CharNo);
until(CharNo >= Max);
end;
Regards,
Lars
.
- References:
- New function's UpperCase / LowerCase
- From: Lars G
- Re: New function's UpperCase / LowerCase
- From: John O'Harrow
- Re: New function's UpperCase / LowerCase
- From: Lars G
- Re: New function's UpperCase / LowerCase
- From: Jouni Turunen
- Re: New function's UpperCase / LowerCase
- From: Lars G
- New function's UpperCase / LowerCase
- Prev by Date: Re: New function's UpperCase / LowerCase
- Next by Date: Re: Fastcode CharPosRev B&V 0.7.0
- Previous by thread: Re: New function's UpperCase / LowerCase
- Next by thread: Fastcode SpreadsheetCreator 1.0.0
- Index(es):