Subject Re: [firebird-support] UDF Problem
Author Robert Tulloch
Hi:

Robert Tulloch wrote:

>Hi:
>
>
>Dimitry Sibiryakov wrote:
>
>
Tried your suggestions and get same disconnect result!! What do you think?

library strudf;

uses
SysUtils;

function fn_ProperCaseString(var szSource, szResult : PChar): PChar;
cdecl; export;
var
i : integer;
len : integer;
begin
result := szResult;
if strlen(szSource) = 0 then
begin
szResult^ := #0;
exit;
end;
len := strlen(szSource);
i := 0;
szSource[i] := UpCase(szSource[i]); {Catch the first letter and
uppercase it}
while (i < len) do
begin
szResult^ := szSource^;
while (szResult[i] <> ' ') and (i < Len) do
begin
inc(i);
inc(szResult);
szResult^ := szSource^;
end;
inc(i);
inc(szResult);
szSource[i] := UpCase(szSource[i]); {Catch the next first letter and
uppercase it}
end;
end;


exports
fn_ProperCaseString;
begin
end.


[Non-text portions of this message have been removed]