Thema: Delphi Ord für Int64

Einzelnen Beitrag anzeigen

Alter Mann

Registriert seit: 15. Nov 2003
Ort: Berlin
934 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#4

Re: Ord für Int64

  Alt 9. Sep 2009, 07:53
Peinlich

Aber wie immer, sehr Zielführend!

Mache es jetzt so:
Delphi-Quellcode:
function GetTC(IntStr : String) : Integer;
var
    I : Integer;
    S : Array[0..1] of Char;
begin
  Result := 0;
  if GetLocaleInfo(GetUserDefaultLangID, LOCALE_STHOUSAND, S, 2) = 0 then S[0] := '.';

  for I := 1 to Length(IntStr) do
    if Ord(IntStr[I]) = Ord(S[0]) then Inc(Result);
end;
  Mit Zitat antworten Zitat