mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:06:14 +02:00
--- Merging r47068 into '.':
U rtl/objpas/sysutils/syshelp.inc U rtl/objpas/sysutils/syshelph.inc --- Recording mergeinfo for merge of r47068 into '.': U . # revisions: 47068 r47068 | michael | 2020-10-09 13:21:30 +0200 (Fri, 09 Oct 2020) | 1 line Changed paths: M /trunk/rtl/objpas/sysutils/syshelp.inc M /trunk/rtl/objpas/sysutils/syshelph.inc * Patch from Werner Pamler to implement TStringSplitOptions.ExcludeLastEmpty git-svn-id: branches/fixes_3_2@47099 -
This commit is contained in:
parent
3659780850
commit
c2bd150407
@ -1232,6 +1232,11 @@ begin
|
|||||||
Inc(Len);
|
Inc(Len);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if (TStringSplitOptions.ExcludeLastEmpty=Options) then
|
||||||
|
if (Len > 0) and (Result[Len-1] = '') then
|
||||||
|
dec(Len);
|
||||||
|
|
||||||
SetLength(Result,Len);
|
SetLength(Result,Len);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1318,6 +1323,11 @@ begin
|
|||||||
Inc(Len);
|
Inc(Len);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
If (TStringSplitOptions.ExcludeLastEmpty=Options) then
|
||||||
|
if (Len > 0) and (Result[Len-1] = '') then
|
||||||
|
dec(Len);
|
||||||
|
|
||||||
SetLength(Result,Len);
|
SetLength(Result,Len);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ Type
|
|||||||
TCompareOptions = system.TCompareOptions;
|
TCompareOptions = system.TCompareOptions;
|
||||||
|
|
||||||
{$SCOPEDENUMS ON}
|
{$SCOPEDENUMS ON}
|
||||||
TStringSplitOptions = (None, ExcludeEmpty);
|
TStringSplitOptions = (None, ExcludeEmpty, ExcludeLastEmpty);
|
||||||
{$SCOPEDENUMS OFF}
|
{$SCOPEDENUMS OFF}
|
||||||
|
|
||||||
{ TStringHelper }
|
{ TStringHelper }
|
||||||
|
Loading…
Reference in New Issue
Block a user