IT79637
asked on
How to get data from a char array to a string variable?
Hi Experts,
I'm using Delphi 7.
How do I get character data in an array to a string? I'm using a For loop because I only want a subset of the data from the array.
The code below does not
Thanks much!
I'm using Delphi 7.
How do I get character data in an array to a string? I'm using a For loop because I only want a subset of the data from the array.
The code below does not
Thanks much!
var
Buffer : array [0..MAXFILESIZE] of char;
OCRString : string;
for i := posBegin to posEnd do
OCRString := OCRString + (Str[I]) ;
My string looks like this:
ABCD#/ABC|DEF|GHIJK\#l;f-3 094QWERalsefd
I want to extract pos 4 to 19 (start with first # and end with K before the \).
The output OCRString in debug mode looks like this: #0#$12#0#0#0#1#0#0#0#1#0#0#0'4'#0#0#0
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks much.