Linux 进程管理与操作详解
1. 基础函数介绍
在 Linux 环境下进行文件操作时,有几个基础函数非常实用。以下是相关函数的代码:
function TdBaseFileReader.NumberTodBaseNumber(Value: double; Prec, DecPrec: integer; WriteNull: boolean): string; begin if WriteNull then Result := GetBlankString(Prec + DecPrec) else begin //Write the formatted number out Result := FloatToStrF(Value, ffNumber, Prec, DecPrec); if Length(Result) < (Prec + DecPrec) then Result := GetBlankString((Prec + DecPrec) - Length(Result)) + Result; end; end; function TdBaseFileReader.StringTodBaseString(Value: string; FieldSize: integer; WriteNull: boolean): string; begin if WriteNull then Result := GetBlankString(FieldSize) else begin Result := Copy(Value, 1, FieldSize); if Length(Result) < FieldSize then Re