Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pmezard/go-difflib
/ functions
Functions
48 in github.com/pmezard/go-difflib
⨍
Functions
48
◇
Types & classes
5
↓ 40 callers
Function
assertEqual
(t *testing.T, a, b interface{})
difflib/difflib_test.go:18
↓ 23 callers
Function
rep
(s string, count int)
difflib/difflib_test.go:210
↓ 20 callers
Function
splitChars
(s string)
difflib/difflib_test.go:24
↓ 16 callers
Function
SplitLines
Split a string on "\n" while preserving them. The output can be used as input for UnifiedDiff and ContextDiff structures.
difflib/difflib.go:768
↓ 10 callers
Function
NewMatcher
(a, b []string)
difflib/difflib.go:100
↓ 5 callers
Function
GetContextDiffString
Like WriteContextDiff but returns the diff a string.
difflib/difflib.go:760
↓ 5 callers
Method
GetOpCodes
Return list of 5-tuples describing how to turn a into b. Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple has i1 == j1 == 0, and rem
difflib/difflib.go:373
↓ 5 callers
Function
GetUnifiedDiffString
Like WriteUnifiedDiff but returns the diff a string.
difflib/difflib.go:635
↓ 5 callers
Method
Ratio
Return a measure of the sequences' similarity (float in [0,1]). Where T is the total number of elements in both sequences, and M is the number of mat
difflib/difflib.go:465
↓ 5 callers
Function
min
(a, b int)
difflib/difflib.go:26
↓ 4 callers
Method
GetGroupedOpCodes
Isolate change clusters by eliminating ranges with no changes. Return a generator of groups with up to n lines of context. Each group is in the same
difflib/difflib.go:413
↓ 4 callers
Method
isBJunk
(s string)
difflib/difflib.go:192
↓ 4 callers
Function
max
(a, b int)
difflib/difflib.go:33
↓ 3 callers
Function
NewMatcherWithJunk
(a, b []string, autoJunk bool, isJunk func(string) bool)
difflib/difflib.go:106
↓ 3 callers
Function
assertAlmostEqual
(t *testing.T, a, b float64, places int)
difflib/difflib_test.go:12
↓ 3 callers
Function
calculateRatio
(matches, length int)
difflib/difflib.go:40
↓ 2 callers
Method
GetMatchingBlocks
Return list of triples describing matching subsequences. Each triple is of the form (i, j, n), and means that a[i:i+n] == b[j:j+n]. The triples are
difflib/difflib.go:305
↓ 2 callers
Method
QuickRatio
Return an upper bound on ratio() relatively quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute.
difflib/difflib.go:477
↓ 2 callers
Method
RealQuickRatio
Return an upper bound on ratio() very quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute than either
difflib/difflib.go:509
↓ 2 callers
Method
SetSeqs
Set two sequences to be compared.
difflib/difflib.go:115
↓ 2 callers
Function
benchmarkSplitLines
(b *testing.B, count int)
difflib/difflib_test.go:409
↓ 2 callers
Function
formatRangeContext
Convert range to the "ed" format.
difflib/difflib.go:642
↓ 2 callers
Function
formatRangeUnified
Convert range to the "ed" format
difflib/difflib.go:515
↓ 1 callers
Method
SetSeq1
Set the first sequence to be compared. The second sequence to be compared is not changed. SequenceMatcher computes and caches detailed information ab
difflib/difflib.go:129
↓ 1 callers
Method
SetSeq2
Set the second sequence to be compared. The first sequence to be compared is not changed.
difflib/difflib.go:140
↓ 1 callers
Function
WriteContextDiff
Compare two sequences of lines; generate the delta as a context diff. Context diffs are a compact way of showing line changes and a few lines of cont
difflib/difflib.go:674
↓ 1 callers
Function
WriteUnifiedDiff
Compare two sequences of lines; generate the delta as a unified diff. Unified diffs are a compact way of showing line changes and a few lines of cont
difflib/difflib.go:559
↓ 1 callers
Method
chainB
()
difflib/difflib.go:151
↓ 1 callers
Method
findLongestMatch
Find longest matching block in a[alo:ahi] and b[blo:bhi]. If IsJunk is not defined: Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where al
difflib/difflib.go:221
Function
BenchmarkSplitLines100
(b *testing.B)
difflib/difflib_test.go:420
Function
BenchmarkSplitLines10000
(b *testing.B)
difflib/difflib_test.go:424
Function
ExampleGetContextDiffCode
()
difflib/difflib_test.go:138
Function
ExampleGetContextDiffString
()
difflib/difflib_test.go:175
Function
ExampleGetUnifiedDiffCode
()
difflib/difflib_test.go:105
Function
TestGetOptCodes
(t *testing.T)
difflib/difflib_test.go:40
Function
TestGroupedOpCodes
(t *testing.T)
difflib/difflib_test.go:61
Function
TestOmitFilenames
(t *testing.T)
difflib/difflib_test.go:360
Function
TestOutputFormatNoTrailingTabOnEmptyFiledate
(t *testing.T)
difflib/difflib_test.go:343
Function
TestOutputFormatRangeFormatContext
(t *testing.T)
difflib/difflib_test.go:295
Function
TestOutputFormatRangeFormatUnified
(t *testing.T)
difflib/difflib_test.go:278
Function
TestOutputFormatTabDelimiter
(t *testing.T)
difflib/difflib_test.go:319
Function
TestSFBugsComparingEmptyLists
(t *testing.T)
difflib/difflib_test.go:265
Function
TestSFBugsRatioForNullSeqn
(t *testing.T)
difflib/difflib_test.go:258
Function
TestSequenceMatcherRatio
(t *testing.T)
difflib/difflib_test.go:33
Function
TestSplitLines
(t *testing.T)
difflib/difflib_test.go:395
Function
TestWithAsciiBJunk
(t *testing.T)
difflib/difflib_test.go:238
Function
TestWithAsciiOnDelete
(t *testing.T)
difflib/difflib_test.go:230
Function
TestWithAsciiOneInsert
(t *testing.T)
difflib/difflib_test.go:214