Qore Diff Module Reference  1.0
Diff Namespace Reference

the Diff namespace contains all the objects in the Diff module More...

Functions

list< auto > diff (softlist< auto > old, softlist< auto > neww)
 returns differences in two lists More...
 
string diff_text (string s1, string s2)
 shows differences between two strings considering lines as elementary unit. This function clones standard unix diff More...
 

Detailed Description

the Diff namespace contains all the objects in the Diff module

Function Documentation

◆ diff()

list<auto> Diff::diff ( softlist< auto >  old,
softlist< auto >  neww 
)

returns differences in two lists

Example:
list diff = diff((1, 2, 3, 4), (2, 3, 5));
Parameters
oldsome list
newwanother list

◆ diff_text()

string Diff::diff_text ( string  s1,
string  s2 
)

shows differences between two strings considering lines as elementary unit. This function clones standard unix diff

Example:
string diff = diff_text(str1, str2);
Parameters
s1some string
s2another string