summary refs log tree commit diff stats
path: root/nim/strutils.pas
diff options
context:
space:
mode:
Diffstat (limited to 'nim/strutils.pas')
-rwxr-xr-x[-rw-r--r--]nim/strutils.pas10
1 files changed, 8 insertions, 2 deletions
diff --git a/nim/strutils.pas b/nim/strutils.pas
index f34379fcb..be20b52b2 100644..100755
--- a/nim/strutils.pas
+++ b/nim/strutils.pas
@@ -66,7 +66,7 @@ function repeatChar(count: int; c: Char = ' '): string;
 type
   TStringSeq = array of string;
   TCharSet = set of Char;
-function splitSeq(const s: string; const seps: TCharSet): TStringSeq;
+function split(const s: string; const seps: TCharSet): TStringSeq;
 
 function startsWith(const s, prefix: string): bool;
 function endsWith(const s, postfix: string): bool;
@@ -78,9 +78,15 @@ function strip(const s: string; const chars: TCharSet = WhiteSpace): string;
 function allCharsInSet(const s: string; const theSet: TCharSet): bool;
 
 function quoteIfContainsWhite(const s: string): string;
+procedure addSep(var dest: string; sep: string = ', '); 
 
 implementation
 
+procedure addSep(var dest: string; sep: string = ', '); 
+begin
+  if length(dest) > 0 then add(dest, sep)
+end;
+
 function quoteIfContainsWhite(const s: string): string;
 begin
   if ((find(s, ' ') >= strStart)
@@ -148,7 +154,7 @@ begin
   end
 end;
 
-function splitSeq(const s: string; const seps: TCharSet): TStringSeq;
+function split(const s: string; const seps: TCharSet): TStringSeq;
 var
   first, last, len: int;
 begin