eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DiffListUtility':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: DiffListUtility


Inheritance:

   Object
   |
   +--DiffListUtility

Package:
stx:libtool
Category:
Views-Text
Version:
rev: 1.12 date: 2018/10/12 17:59:32
user: stefan
file: DiffListUtility.st directory: libtool
module: stx stc-classLibrary: libtool
Author:
cg (cg@CG-PC)

Description:


a utility to encapsulate access to the diff command
(may also be a facade to a smalltalk-diff algorithm, eventually)


[instance variables:]

[class variables:]


Related information:



Class protocol:

defaults
o  diffCommand
return the diff-command (with argument placeHolders).
By default, diff is used with windows, diff -b with Unix.
You can change this via the diffCommandTemplate

o  diffCommandTemplate: aCommandTemplateString
set the diff-command template

private
o  saveForDiff: text on: stream
i := line indexOf:Character return.

utilities
o  diffListFor: text1 and: text2
execute DiffCommand to get a list of diffs.

usage example(s):

     self 
        diffListFor:#(
                        'hello world'
                        'line1'
                        'line3'
                        'line4'
                    )
        and:        #(
                        'Hello World'
                        'line1'
                        'line2'
                        'line3'
                    )



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sun, 17 Jan 2021 18:00:37 GMT