9
votes
Vote UpVote

Getting Rid of the Middleman

DelphiTools – On this StackOverflow question David Heffernan asked about a hack I’m using in DWScript’s UnifyAssignString. TStringListCracker The code of the function looks like: procedure UnifyAssignString(const fromStr : UnicodeString; var toStr : UnicodeString); var i : Integer; sl : TUnifierStringList; begin if fromStr = '' then toStr := '' else begin i := Ord(fromStr[1]) and High(vCharStrings); sl := vCharStrings[i]; sl.FLock.Enter; i := sl.AddObject(fromStr, nil); toStr := TStringListCracker(sl).FList[i].FString; // HACK HERE ...
Favorite? Off-Topic? Eric @ 2012-03-28 08:23

Statistics

Visits: 811
Votes: 9
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Chris
Ericc
François
knight_killer
Primoz Gabrijelcic
Stefan Glienke
Tier777
Yogi Yang
Zzzzz
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)