Tagged Questions
8
votes
1answer
153 views
Why doesn't TPageProducer remove quotation marks from strings?
I'm trying to debug behaviour that has only appeared when my large app - working fine in XE3 - is run after compiling with XE4. The issue seems to cause some quoted strings (eg "MyString") to retain ...
-1
votes
1answer
69 views
Parsing/Splitting a string doesn't return all the parts
I have a procedure that I found from another question that supposedly splits/delimits a string , when provided a string, a delimiter, and and a TStrings list. That procedure is:
procedure ...
0
votes
2answers
124 views
StringReplace not working as expected
This is a new question of this topic:
How do I store and load a list of key-value pairs in a string?
I have come to the following code:
procedure TForm1.BotaoLimpaClick(Sender: TObject);
var
...
-1
votes
1answer
133 views
How do I store and load a list of key-value pairs in a string?
I have a list of strings and the values they are to be replaced with. I'm trying to combine them in a list like 'O'='0',' .'='.', ... so it's easy for me to edit it and add more pairs of replacements ...
0
votes
1answer
74 views
Delphi - Format Filename from FTP
okay, I've the following problem:
I like to get a list of all .txt files on my FTP Server in a special folder.
I solved this already.
if IdFTP1.DirectoryListing.Count>0 then
for i := 2 ...
2
votes
1answer
92 views
Passing Delphi PChar to C#
I have some problems transferring data for delphi imported activeX control in c# environment.
I have a function on delphi side, which takes and returns PChar. I can modify it or do whatever I want ...
2
votes
1answer
118 views
Why I can't insert commas plus spaces in a RichEdit Control (Delphi)
I’m trying to replace a "comma" with "comma + space" using the following code in a procedure called by the OnChange Event on a RichEdit control in Delphi 2010.
SomeString := ...
4
votes
3answers
140 views
Replace chars in a HTML string - Except Tags
I need to go through a HTML string and replace characters with 0 (zero), except tags, spaces and line breaks. I created this code bellow, but it is too slow. Please, can someone help me to make it ...
-1
votes
1answer
63 views
How to access char in TStringGrid?
How to get a char from TStringGrid in Delphi?
StringGrid1.Cells[X, Y, Z]//doesn't work
StringGrid1.Cells[X][Y][Z]//doesn't work
0
votes
2answers
217 views
Delphi 7 Function - String or ShortString? Integer or Word? [closed]
I am a "performance" enthusiast programmer, and have a basic theoretical question: Does Delphi 7 has some "way" to identify the kind of string used and automatically define the correct type?
For ...
3
votes
2answers
188 views
How do I pass a string variable to a function that expects a PChar?
I have this code:
ShellExecute(Handle, 'open',
'C:\Users\user\Desktop\sample\menu\WTSHELP\start.html',
nil, nil, sw_Show);
How can I replace the literal in the third ...
1
vote
2answers
169 views
How to add space between numbers, with DisplayFormat
How can I add spaces between numbers with DisplayFormat.
Like this example:
50130301037855000150550010000000131000000132
I'm need this:
5013 0301 0378 5500 0150 5500 1000 0000 1310 0000 0132
...
2
votes
3answers
146 views
Delphi Equivalent To VB “Space”
Visual Basic "Space" Function returns a string consisting of the specified number of spaces.
Visual Basic Example:
Property Get Sections() As String
Dim sBuf As String
Dim iSize As String
Dim ...
0
votes
2answers
148 views
What is the most light-weight method to store a string in an property of type TObject?
The situation:
I create visual components from a TDataSet that should keep an id as a reference. The component can only store objects, not strings.
Pseudo code:
for Record in DataSet do
...
2
votes
1answer
280 views
Error calling DLL with Unicode Delphi
I have a DLL with this function signature:
function KP_RecuperarDadosFabricante(EnderecoIp, ChaveAcesso,
Porta: string; Return: PAnsiChar): Integer; stdcall; external 'Key.dll';
This is the ...