function GetToken(var s:string;const Delimer:char = ' '): string; var i:integer; begin if s='' then Result:='' else begin i:=1; while not (s[i] in [Delimer,#0]) do inc(i); Result:=copy(s,1,i-1); Delete(s,1,i); end; end;
Function GetFIO(fullname: string): string; var sbuf: string; begin Result:=GetToken(fullname); if Result='' then exit; sbuf:=GetToken(fullname); if sbuf<>'' then begin Result:=Result+' '+sbuf[1]+'.'; sbuf:=GetToken(fullname); if sbuf<>'' then Result:=Result+' '+sbuf[1]+'.'; end; end;