From Stealth Client

Jump to: navigation, search

Other

Abs

function Abs(X:Integer):Cardinal

Returns the absolute value of X.

Example 1:

AddToSystemJournal(IntToStr(Abs(-10)));
AddToSystemJournal(IntToStr(Abs(10)));
AddToSystemJournal(IntToStr(Abs(0)));

The result of:

10
10
0

BMSearch

function BMSearch(StartPos: Integer; const S, P: String): Integer

DateTimeToStr

function DateTimeToStr(D: TDateTime): String

FloatToStrF

function FloatToStrF(Value: Extended; Format: TFloatFormat; Precision, Digits: Integer): string

GetTickCount

function GetTickCount : Cardinal;

IntToHex

function IntToHex(Value: Integer; Digits: Integer): String;

IsFigureText

function IsFigureText(s: string): boolean

MsToDateTime

function MsToDateTime(TimeMS : Word) : TDateTime

Power

function Power(Base : Extended;Exponent : Extended) : Extended;

Random

function Random(const ARange: Integer): Integer;

RandomRange

function RandomRange(const AFrom, ATo: Integer): Integer;

Randomize

procedure Randomize

StrBreakApart

procedure StrBreakApart(const S, Delimeter : string; Parts : TStrings)

Разбивает строки на под-строки.

Пример:

Program StrBreakApartDemo;
var i : Integer;
    SL : TStringList;
 
Begin
{Before working with TStringList Object - You must CREATE it!}
SL := TStringList.Create;
 
StrBreakApart('This is a StrBreakApart Demo', ' ', SL);
if SL.Count > 0 then for i := 0 to SL.Count - 1 do
    begin
    AddToSystemJournal(SL.Strings[i]);
    end;
 
{Note:
When you finish working with TStringList Object - You must FREE it!}
SL.Free;
 
End.

StrToBool

function StrToBool(constS : string) : Boolean;

StrToDateTime

function StrToDateTime(const s: string): TDateTime

StrToTime

function StrToTime(const s: String): TDateTime

TimeToStr

function TimeToStr(D: TDateTime): String

Timer

function Timer: Cardinal