Gin
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Diff::Patch Struct Reference

A compact text patch storing only the differences between two texts. More...

#include <gin_diff.h>

Classes

struct  Hunk
 

Public Member Functions

juce::String toString () const
 Serializes the patch to a human-readable string.
 

Static Public Member Functions

static Patch fromString (const juce::String &s)
 Parses a patch from its string representation.
 

Public Attributes

std::vector< Hunkhunks
 

Detailed Description

A compact text patch storing only the differences between two texts.

This stores only inserted and removed lines with their line numbers, making it memory efficient while remaining human readable.

Member Function Documentation

◆ toString()

juce::String Diff::Patch::toString ( ) const

Serializes the patch to a human-readable string.

◆ fromString()

static Patch Diff::Patch::fromString ( const juce::String &  s)
static

Parses a patch from its string representation.

Member Data Documentation

◆ hunks

std::vector<Hunk> Diff::Patch::hunks

The documentation for this struct was generated from the following file: