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.17 date: 2021/12/29 17:28:12
user: cg
file: DiffListUtility.st directory: libtool
module: stx stc-classLibrary: libtool

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:]

copyright

COPYRIGHT (c) 2009 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:08:48 GMT