[JEDI.NET-commits] main/run Jedi.System.Strings.pas,1.5,1.6
Status: Pre-Alpha
Brought to you by:
jedi_mbe
From: Marcel B. <jed...@us...> - 2005-03-14 13:31:49
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15239/main/run Modified Files: Jedi.System.Strings.pas Log Message: * Changed occurances of '<param>: array of <type>' to '<param>: <type>Array' (and declared that array type) for each method where such a construct is the last parameter of the declaration; this avoids the compiler adding a ParamArray attribute, which implies slightly differing semantics. * Modified default parameters to overloaded methods (MS suggests this, since not all .NET languages support default parameters). Index: Jedi.System.Strings.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.Strings.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Jedi.System.Strings.pas 4 Mar 2005 14:51:49 -0000 1.5 --- Jedi.System.Strings.pas 14 Mar 2005 13:31:26 -0000 1.6 *************** *** 33,36 **** --- 33,42 ---- {$ENDREGION} + {$REGION 'Helper types (Delphi only)'} + type + CharArray = array of Char; + IntegerArray = array of Integer; + {$ENDREGION} + {$REGION 'Enumerations'} type *************** *** 58,62 **** constructor Create; overload; constructor Create(defaultWidth: Integer); overload; ! constructor Create(tabs: array of Integer); overload; constructor Create(tabs: array of Integer; defaultWidth: Integer); overload; procedure Add(tabPosition: Integer); --- 64,68 ---- constructor Create; overload; constructor Create(defaultWidth: Integer); overload; ! constructor Create(tabs: IntegerArray); overload; constructor Create(tabs: array of Integer; defaultWidth: Integer); overload; procedure Add(tabPosition: Integer); *************** *** 67,72 **** function Equals(obj: &Object): Boolean; override; function RealDefaultWidth: Integer; ! procedure Remove(tabPosition: Integer; includeFollowing: Boolean = False); ! procedure RemoveAt(index: Integer; includeFollowing: Boolean = False); function TabFrom(pos: Integer): Integer; function get_Count: Integer; --- 73,80 ---- function Equals(obj: &Object): Boolean; override; function RealDefaultWidth: Integer; ! procedure Remove(tabPosition: Integer); overload; ! procedure Remove(tabPosition: Integer; includeFollowing: Boolean); overload; ! procedure RemoveAt(index: Integer); overload; ! procedure RemoveAt(index: Integer; includeFollowing: Boolean); overload; function TabFrom(pos: Integer): Integer; function get_Count: Integer; *************** *** 92,101 **** public class function EscapeString(s: string): string; overload; static; ! class function EscapeString(s: string; escapeCharacters: array of Char): string; overload; static; class function ParseEscapedString(s: string): string; static; {$ENDREGION} {$REGION 'Escaped strings common implementation methods'} strict protected ! class function EscapeStringImpl(s: string; escapeCharacters: array of Char): string; static; {$ENDREGION} {$REGION 'Escaped strings constants'} --- 100,109 ---- public class function EscapeString(s: string): string; overload; static; ! class function EscapeString(s: string; escapeCharacters: CharArray): string; overload; static; class function ParseEscapedString(s: string): string; static; {$ENDREGION} {$REGION 'Escaped strings common implementation methods'} strict protected ! class function EscapeStringImpl(s: string; escapeCharacters: CharArray): string; static; {$ENDREGION} {$REGION 'Escaped strings constants'} *************** *** 139,144 **** {$REGION 'Manipulations'} public ! class function RemoveDuplicateChars(s: string; char: System.Char): string; overload; static; ! class function RemoveDuplicateChars(s: string; chars: array of System.Char): string; overload; static; class function &Repeat(s: string; count: Integer): string; static; {$ENDREGION} --- 147,152 ---- {$REGION 'Manipulations'} public ! class function RemoveDuplicateChars(s: string; char: Char): string; overload; static; ! class function RemoveDuplicateChars(s: string; chars: CharArray): string; overload; static; class function &Repeat(s: string; count: Integer): string; static; {$ENDREGION} *************** *** 153,164 **** {$REGION 'Subsets'} public ! class function After(s: string; delimiter: System.Char): string; static; ! class function AfterAnyOf(s: string; delimiters: array of System.Char): string; static; ! class function AfterLast(s: string; delimiter: System.Char): string; static; ! class function AfterLastAnyOf(s: string; delimiters: array of System.Char): string; static; ! class function Before(s: string; delimiter: System.Char): string; static; ! class function BeforeAnyOf(s: string; delimiters: array of System.Char): string; static; ! class function BeforeLast(s: string; delimiter: System.Char): string; static; ! class function BeforeLastAnyOf(s: string; delimiters: array of System.Char): string; static; class function Left(s: string; length: Integer): string; static; class function Mid(s: string; from, &to: Integer): string; static; --- 161,172 ---- {$REGION 'Subsets'} public ! class function After(s: string; delimiter: Char): string; static; ! class function AfterAnyOf(s: string; delimiters: CharArray): string; static; ! class function AfterLast(s: string; delimiter: Char): string; static; ! class function AfterLastAnyOf(s: string; delimiters: CharArray): string; static; ! class function Before(s: string; delimiter: Char): string; static; ! class function BeforeAnyOf(s: string; delimiters: CharArray): string; static; ! class function BeforeLast(s: string; delimiter: Char): string; static; ! class function BeforeLastAnyOf(s: string; delimiters: CharArray): string; static; class function Left(s: string; length: Integer): string; static; class function Mid(s: string; from, &to: Integer): string; static; *************** *** 167,172 **** {$REGION 'Tab expansions'} public ! class function ExpandTabs(s: string; tabs: array of Int32): string; overload; static; ! class function ExpandTabs(s: string; tabs: array of Int32; additionalTabsWidth: Int32): string; overload; static; class function ExpandTabs(s: string; tabSet: TabSet): string; overload; static; {$ENDREGION} --- 175,180 ---- {$REGION 'Tab expansions'} public ! class function ExpandTabs(s: string; tabs: IntegerArray): string; overload; static; ! class function ExpandTabs(s: string; tabs: array of Integer; additionalTabsWidth: Int32): string; overload; static; class function ExpandTabs(s: string; tabSet: TabSet): string; overload; static; {$ENDREGION} *************** *** 183,191 **** {$ENDREGION} - {$REGION 'Array type declarations'} - type - CharArray = array of Char; - {$ENDREGION} - {$REGION 'StringUtils'} constructor StringUtils.Create; --- 191,194 ---- *************** *** 1023,1026 **** --- 1026,1034 ---- end; + procedure StringUtils.TabSet.Remove(tabPosition: Integer); + begin + Remove(tabPosition, False); + end; + procedure StringUtils.TabSet.Remove(tabPosition: Integer; includeFollowing: Boolean); var *************** *** 1034,1037 **** --- 1042,1050 ---- end; + procedure StringUtils.TabSet.RemoveAt(index: Integer); + begin + RemoveAt(index, False); + end; + procedure StringUtils.TabSet.RemoveAt(index: Integer; includeFollowing: Boolean); begin |