Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

DiffTools

Guides

  • Diff Tools

Tech Notes

  • Comparing Notebooks
  • Introduction to DiffTools

Symbols

  • AlignCellLists
  • BaseDiffStyle
  • Diff3
  • DiffApply
  • DiffGranularity
  • DiffInputFunction
  • DiffInvert
  • Diff
  • DiffObject
  • DiffView
  • IgnoreElements
  • IncludeMatches
  • MoreMatches
[
EXPERIMENTAL
]
Wolfram`DiffTools`
DiffGranularity
​
DiffGranularity
is an option to
Diff
and related functions that indicates with what granularity to compare the given expressions.
​
Details and Options

Examples  
(1)
Basic Examples  
(1)
By default, strings are compared as a sequence of characters:
In[1]:=
Diff

,

Out[1]=
Wolfram`DiffTools`DiffObjectViewer[1,Wolfram`DiffTools`DiffObject[1,Characters,Changes{{{1,1}{The first output still shows t,Wolfram`DiffTools`MoreMatches[96], of what youhave been doing. }},{157But,157However,},{{160,165}{ you may want a fundamentally ,Wolfram`DiffTools`MoreMatches[115],utput is provided by Dynamic.}}},View{}],
Combined
]
Use
DiffGranularity
to treat strings as a sequence of lines instead:
In[2]:=
Diff

,
,
DiffGranularity
"Lines"
Out[2]=
Wolfram`DiffTools`DiffObjectViewer[1,Wolfram`DiffTools`DiffObject[1,Lines,Changes{{{1,1}{The first output still shows the value from when x was 5, even though it is now,7. This is useful if you want to see a history of what you}},{3{have been doing. But you may want a fundamentally different kind of},3{have been doing. However, you may want a fundamentally different kind of}},{{4,4}{output, one that is automatically updated to always reflect its current value.,This new kind of output is provided by Dynamic.}}},View{}],
Unified
]
SeeAlso
Diff
RelatedGuides
▪
Diff Tools
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com