Changeset 118 for trunk/NewView/StringUtilsUnit.pas
- Timestamp:
- Apr 26, 2007, 1:54:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NewView/StringUtilsUnit.pas
r110 r118 39 39 // prefices all occurences of one of the chars in aStringWithChars with anEscape char 40 40 // if the escapeChar itself is found, then it is doubled 41 Function StrEscapeAllCharsBy( Const aReceiver: String; const aSetOfChars: TSetOfChars; const anEscapeChar: char): String;41 Function StrEscapeAllCharsBy(const aReceiver: String; const aSetOfChars: TSetOfChars; const anEscapeChar: char): String; 42 42 43 43 // Extract all fields in a String given a set of delimiter characters and … … 46 46 // StrExtractStrings('1x2x3\x4', 'x', '\') -> 47 47 // returns 4 strings: '1', '', '2' and '3x4' 48 Procedure StrExtractStrings(Var aResult : TStrings; Const aReceiver: String; const aSetOfChars: TSetOfChars; const anEscapeChar: char);48 Procedure StrExtractStrings(Var aResult : TStrings; const aReceiver: String; const aSetOfChars: TSetOfChars; const anEscapeChar: char); 49 49 50 50 // same as StrExtractStrings but ignores empty strings 51 Procedure StrExtractStringsIgnoreEmpty(Var aResult : TStrings; Const aReceiver: String; const aSetOfChars: TSetOfChars; const anEscapeChar: char);51 Procedure StrExtractStringsIgnoreEmpty(Var aResult : TStrings; const aReceiver: String; const aSetOfChars: TSetOfChars; const anEscapeChar: char); 52 52 53 53 // removes all occurences of char from aSetOfChars from the beginning … … 74 74 // Returns a copy of the string including all characters until one from aSetOfChars found 75 75 Function StrLeftUntil(const aReceiver: String; const aSetOfChars: TSetOfChars) : String; 76 77 // Returns a copy of the string starting at aPos 78 Function StrSubstringFrom(const aReceiver: String; const aPos : Integer) : String; 76 79 77 80 // returns true if the String starts with the provided one … … 113 116 // case insensitive 114 117 Function CaseInsensitivePos(const aPart: String; const aString: String ): longint; 118 115 119 116 120 // -------------------- … … 448 452 449 453 454 Function StrSubstringFrom(const aReceiver: String; const aPos : Integer) : String; 455 Begin 456 Result := copy(aReceiver, aPos, length(aReceiver) - aPos + 1); 457 end; 458 459 450 460 Function StrStartsWith(const aReceiver: String; const aStartString: String) : Boolean; 451 461 Var
Note:
See TracChangeset
for help on using the changeset viewer.