author | unc0rr |
Wed, 03 Dec 2014 00:20:21 +0300 | |
branch | qmlfrontend |
changeset 10608 | b85759f2ba18 |
parent 10517 | 844bd43db47a |
child 10616 | 20a2d5e6930a |
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; |
10517 | 7 |
procedure underScore2Space(var s: shortstring); |
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
8 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
9 |
implementation |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
10 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
11 |
var |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
12 |
str2PCharBuffer: array[0..255] of char; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
13 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
14 |
function str2PChar(const s: shortstring): PChar; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
15 |
var i: Integer; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
16 |
begin |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
17 |
for i:= 1 to Length(s) do |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
18 |
begin |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
19 |
str2PCharBuffer[i - 1] := s[i]; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
20 |
end; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
21 |
str2PCharBuffer[Length(s)]:= #0; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
22 |
str2PChar:= @(str2PCharBuffer[0]); |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
23 |
end; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
24 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
25 |
function intToStr(n: LongInt): shortstring; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
26 |
begin |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
27 |
str(n, intToStr) |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
28 |
end; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
29 |
|
10440 | 30 |
function midStr(s: shortstring; pos: byte): shortstring; |
31 |
begin |
|
32 |
midStr:= copy(s, pos, length(s) - pos + 1) |
|
33 |
end; |
|
34 |
||
10517 | 35 |
procedure underScore2Space(var s: shortstring); |
36 |
var i: LongInt; |
|
37 |
begin |
|
38 |
for i:= length(s) downto 1 do |
|
39 |
if s[i] = '_' then s[i]:= ' ' |
|
40 |
end; |
|
41 |
||
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff
changeset
|
42 |
end. |