summaryrefslogtreecommitdiff
path: root/lowlevelunit.pas
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-03-10 10:26:35 +0100
committerErich Eckner <git@eckner.net>2016-03-15 13:01:16 +0100
commitb67ce1d2d4274422b846584c1d15da64230f4507 (patch)
tree3708c4162fb924b64ad857d78a6dcb7dca8ae440 /lowlevelunit.pas
parent7f75a6ee2c2aab633a76bdb1e3183eaa80c3c48b (diff)
downloadunits-b67ce1d2d4274422b846584c1d15da64230f4507.tar.xz
erstesArgument kann nun auch Leerzeichen erhalten
Diffstat (limited to 'lowlevelunit.pas')
-rw-r--r--lowlevelunit.pas11
1 files changed, 3 insertions, 8 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas
index e9991ed..ced3603 100644
--- a/lowlevelunit.pas
+++ b/lowlevelunit.pas
@@ -73,8 +73,7 @@ procedure dumpExceptionCallStack(E: Exception);
function startetMit(start: string; var s: string): boolean;
function endetMit(ende: string; var s: string): boolean;
function trimAll(s: string): string;
-function erstesArgument(var s: string): string; overload; inline;
-function erstesArgument(var s: string; Trenner: string): string; overload; inline;
+function erstesArgument(var s: string; Trenner: string = ' '; trimmen: boolean = true): string; inline;
function mydatetimetostr(t: tDateTime): string;
function t2x2ExtendedToStr(p: t2x2Extended): string;
function tExtPointToStr(p: tExtPoint): string;
@@ -588,15 +587,11 @@ begin
delete(result,pos(' ',result),1);
end;
-function erstesArgument(var s: string): string;
-begin
- result:=erstesArgument(s,' ');
-end;
-
-function erstesArgument(var s: string; Trenner: string): string;
+function erstesArgument(var s: string; Trenner: string; trimmen: boolean): string;
begin
result:=copy(s,1,pos(Trenner,s+Trenner)-1);
delete(s,1,length(result)+length(Trenner));
+ if not trimmen then exit;
s:=trim(s);
result:=trim(result);
end;