From b67ce1d2d4274422b846584c1d15da64230f4507 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 10 Mar 2016 10:26:35 +0100 Subject: erstesArgument kann nun auch Leerzeichen erhalten --- lowlevelunit.pas | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'lowlevelunit.pas') 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; -- cgit v1.2.3-70-g09d2