Tagged Questions
2
votes
2answers
347 views
Sorting multidimensional array in Delphi 2007
I have a multidimensional array similar to the one described below:
Matrix => array(
[0] => array( [0] => 7, [1] => 'hello' ),
[1] => array( [0] => 3, [1] => 'there' ),
[2] ...
12
votes
1answer
472 views
Why does this string have a reference count of 4? (Delphi 2007)
This is a very Delphi specific question (maybe even Delphi 2007 specific). I am currently writing a simple StringPool class for interning strings. As a good little coder I also added unit tests and ...
8
votes
4answers
3k views
Find the last occurrence of char in a string
Does there exist any RTL Delphi function to determine the position of the last occurrence of a char in a string?
6
votes
3answers
5k views
Delphi: count number of times a string occurs in another string
I'm using Delphi 2007 and wonder if there is a simple way of counting the number of times a string occurs in another string. Any builtin function I can use?
Examples:
"How" occurs once in the ...
0
votes
2answers
997 views
Replace string that contain #0?
I use this function to read file to string
function LoadFile(const FileName: TFileName): string;
begin
with TFileStream.Create(FileName,
fmOpenRead or fmShareDenyWrite) do begin
try
...
0
votes
1answer
140 views
How do I control the “long strings” compiler option?
How do I control the "long strings" compiler option? I use Delphi 2007
0
votes
1answer
346 views
What's the cause of this Access Violation when concatenating strings in D2007?
I have a procedure that accepts 2 string parameters, one of them has a default value. Inside the procedure, I want to concatenate one and the other and some literals to form one larger string. ...