Produced by Araxis Merge on 10/18/2017 11:37:29 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | OSCIF_CPRS v32 Phase 2 Build 2OR3.0405_August_2017.zip\OR_30_405V36_SRC.zip\XE8\Broker\Source | MFunStr.pas | Wed Oct 11 20:08:07 2017 UTC |
| 2 | OSCIF_CPRS v32 Phase 2 Build 2OR3.0405_August_2017.zip\OR_30_405V36_SRC.zip\XE8\Broker\Source | MFunStr.pas | Tue Oct 17 19:58:08 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 268 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | { ******** ********** ********** ********** ********** ********** **** | |
| 2 | Pa ckage: XWB - Kernel RPCBroker | |
| 3 | Da te Created : Sept 18, 1997 (Ver sion 1.1) | |
| 4 | Si te Name: O akland, OI Field Off ice, Dept of Veteran Affairs | |
| 5 | De velopers: PII, PII, PII | |
| 6 | De scription: Contains TRPCBroker and relat ed compone nts. | |
| 7 | Unit: MF unStr func tions that emulate M UMPS funct ions. | |
| 8 | Cu rrent Rele ase: Versi on 1.1 Pat ch 65 | |
| 9 | ********** ********** ********** ********** ********** ********** *** } | |
| 10 | ||
| 11 | { ******** ********** ********** ********** ********** ** | |
| 12 | Changes in v1.1.65 (HGW 06/1 3/2016) XW B*1.1*65 | |
| 13 | 1. Added function RemoveCRLF to strip CR and LF from a str ing. | |
| 14 | ||
| 15 | Changes in v1.1.60 (HGW 12/1 8/2013) XW B*1.1*60 | |
| 16 | 1. Refor mated inde ntation an d comments to make c ode more r eadable. | |
| 17 | ||
| 18 | Changes in v1.1.50 (JLI 9/1/ 2011) XWB* 1.1*50 | |
| 19 | 1. None. | |
| 20 | ********** ********** ********** ********** ********** } | |
| 21 | unit MFunS tr; | |
| 22 | ||
| 23 | interface | |
| 24 | ||
| 25 | uses | |
| 26 | {System} | |
| 27 | System.S ysUtils, | |
| 28 | {Vcl} | |
| 29 | Vcl.Dial ogs; | |
| 30 | ||
| 31 | {procedu re and fun ction prot otypes} | |
| 32 | function Piece(x: string; de l: string; piece1: i nteger = 1 ; piece2: integer=0) : string; | |
| 33 | function Translate (passedStr ing, ident ifier, ass ociator: s tring): st ring; | |
| 34 | function RemoveCRL F(const aS tring: str ing): stri ng; | |
| 35 | ||
| 36 | const | |
| 37 | U: strin g = '^'; | |
| 38 | ||
| 39 | implementa tion | |
| 40 | ||
| 41 | {--------- ---------- -- Transla te ------- ---------- ---------- ------ | |
| 42 | function T RANSLATE(s tring,iden tifier,ass ociator) | |
| 43 | Performs a character -for-chara cter repla cement wit hin a stri ng. | |
| 44 | ---------- ---------- ---------- ---------- ---------- ---------- ------} | |
| 45 | function T ranslate(p assedStrin g, identif ier, assoc iator: str ing): stri ng; | |
| 46 | {} | |
| 47 | var | |
| 48 | index, position: integer; | |
| 49 | newStr ing: strin g; | |
| 50 | substr ing: strin g; | |
| 51 | ||
| 52 | begin | |
| 53 | newStr ing := ''; {initiali ze NewStri ng} | |
| 54 | for in dex := 1 t o length(p assedStrin g) do | |
| 55 | begin | |
| 56 | subs tring := c opy(passed String,ind ex,1); | |
| 57 | posi tion := po s(substrin g,identifi er); | |
| 58 | if p osition > 0 then | |
| 59 | ne wString := newString + copy(as sociator,p osition,1) | |
| 60 | else | |
| 61 | ne wString := newString + copy(pa ssedString ,index,1) | |
| 62 | end; | |
| 63 | result := newStr ing; | |
| 64 | end; //f unction Tr anslate | |
| 65 | ||
| 66 | ||
| 67 | {--------- ---------- -- Piece - ---------- ---------- ---------- ------ | |
| 68 | function P IECE(strin g,delimite r,piece nu mber) | |
| 69 | Returns a field with in a strin g using th e specifie d delimite r. | |
| 70 | ---------- ---------- ---------- ---------- ---------- ---------- ------} | |
| 71 | function P iece(x: st ring; del: string; p iece1: int eger = 1; piece2: in teger=0) : string; | |
| 72 | var | |
| 73 | delInd ex,pieceNu mber: inte ger; | |
| 74 | Resval : String; | |
| 75 | Str: S tring; | |
| 76 | begin | |
| 77 | {initi alize vari ables} | |
| 78 | pieceN umber := 1 ; | |
| 79 | Str := x; | |
| 80 | {delIn dex :=1;} | |
| 81 | if pie ce2 = 0 th en | |
| 82 | piec e2 := piec e1; | |
| 83 | Resval := ''; | |
| 84 | repeat | |
| 85 | delI ndex := Po s(del,Str) ; | |
| 86 | if ( delIndex > 0) or ((p ieceNumber > Pred(pi ece1)) and (pieceNum ber < (pie ce2+1))) t hen | |
| 87 | begi n | |
| 88 | if (pieceNum ber > Pred (piece1)) and (piece Number < ( piece2+1)) then | |
| 89 | be gin | |
| 90 | if (pieceN umber > pi ece1) and (Str <> '' ) then | |
| 91 | Resval : = Resval + del; | |
| 92 | if delInde x > 0 then | |
| 93 | begin | |
| 94 | Resval : = Resval + Copy(Str, 1,delIndex -1); | |
| 95 | Str := C opy(Str,de lIndex+Len gth(del),L ength(Str) ); | |
| 96 | end | |
| 97 | else | |
| 98 | begin | |
| 99 | Resval : = Resval + Str; | |
| 100 | Str := ' '; | |
| 101 | end; | |
| 102 | en d | |
| 103 | el se | |
| 104 | Str := Cop y(Str,delI ndex+Lengt h(del),Len gth(Str)); | |
| 105 | end | |
| 106 | else if Str <> '' then | |
| 107 | St r := ''; | |
| 108 | inc( pieceNumbe r); | |
| 109 | until (pieceNumb er > piece 2); | |
| 110 | Resu lt := Resv al; | |
| 111 | end; //f unction Pi ece | |
| 112 | ||
| 113 | ||
| 114 | {--------- ---------- -- RemoveC RLF ------ ---------- ---------- ------ | |
| 115 | function R EMOVECRLF( string) | |
| 116 | Removes CR and LF ch aracters f rom a a st ring. | |
| 117 | ---------- ---------- ---------- ---------- ---------- ---------- ------} | |
| 118 | function R emoveCRLF( const aStr ing: strin g): string ; | |
| 119 | var | |
| 120 | i, j: in teger; | |
| 121 | begin | |
| 122 | result : = aString; | |
| 123 | j := 0; | |
| 124 | for i := 1 to Leng th(result) do | |
| 125 | begin | |
| 126 | if (no t CharInSe t(result[i ], [#10,#1 3])) then | |
| 127 | begin | |
| 128 | inc (j); | |
| 129 | resu lt[j] := r esult[i] | |
| 130 | end; | |
| 131 | end; | |
| 132 | SetLengt h(result, j); | |
| 133 | end; //fun ction Remo veCRLF | |
| 134 | ||
| 135 | end. |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.