author | unc0rr |
Mon, 03 Nov 2014 23:36:53 +0300 | |
branch | qmlfrontend |
changeset 10454 | 2b590e7972b1 |
parent 10440 | b74a7bbe224e |
child 10517 | 844bd43db47a |
permissions | -rw-r--r-- |
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
1 |
unit uFLUtils; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
2 |
interface |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
3 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
4 |
function str2PChar(const s: shortstring): PChar; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
5 |
function intToStr(n: LongInt): shortstring; |
10440 | 6 |
function midStr(s: shortstring; pos: byte): shortstring; |
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
7 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
8 |
implementation |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
9 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
10 |
var |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
11 |
str2PCharBuffer: array[0..255] of char; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
12 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
13 |
function str2PChar(const s: shortstring): PChar; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
14 |
var i: Integer; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
15 |
begin |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
16 |
for i:= 1 to Length(s) do |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
17 |
begin |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
18 |
str2PCharBuffer[i - 1] := s[i]; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
19 |
end; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
20 |
str2PCharBuffer[Length(s)]:= #0; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
21 |
str2PChar:= @(str2PCharBuffer[0]); |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
22 |
end; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
23 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
24 |
function intToStr(n: LongInt): shortstring; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
25 |
begin |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
26 |
str(n, intToStr) |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
27 |
end; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
28 |
|
10440 | 29 |
function midStr(s: shortstring; pos: byte): shortstring; |
30 |
begin |
|
31 |
midStr:= copy(s, pos, length(s) - pos + 1) |
|
32 |
end; |
|
33 |
||
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
34 |
end. |