diff -r aa8d68817c32 -r 9419294e5f33 hedgewars/uUtils.pas --- a/hedgewars/uUtils.pas Wed Jun 06 17:56:39 2012 -0400 +++ b/hedgewars/uUtils.pas Thu Jun 07 01:10:57 2012 +0200 @@ -24,6 +24,7 @@ uses uTypes, uFloat, GLunit; procedure SplitBySpace(var a, b: shortstring); +procedure SplitByChar(var a, b: shortstring; c: char); procedure SplitByChar(var a, b: ansistring; c: char); {$IFNDEF PAS2C} @@ -83,11 +84,16 @@ {$ENDIF} var CharArray: array[byte] of Char; +procedure SplitBySpace(var a,b: shortstring); +begin +SplitByChar(a,b,' '); +end; + // should this include "strtolower()" for the split string? -procedure SplitBySpace(var a, b: shortstring); +procedure SplitByChar(var a, b: shortstring; c : char); var i, t: LongInt; begin -i:= Pos(' ', a); +i:= Pos(c, a); if i > 0 then begin for t:= 1 to Pred(i) do