JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
juce::TextDiff::Change Struct Reference

Describes a change, which can be either an insertion or deletion. More...

#include "juce_TextDiff.h"

Public Member Functions

bool isDeletion () const noexcept
 Returns true if this change is a deletion, or false for an insertion.
 
String appliedTo (const String &original) const noexcept
 Returns the result of applying this change to a string.
 

Public Attributes

String insertedText
 If this change is a deletion, this string will be empty; otherwise, it'll be the text that should be inserted at the index specified by start.
 
int start
 Specifies the character index in a string at which text should be inserted or deleted.
 
int length
 If this change is a deletion, this specifies the number of characters to delete.
 

Detailed Description

Describes a change, which can be either an insertion or deletion.

Definition at line 53 of file juce_TextDiff.h.

Member Function Documentation

◆ appliedTo()

String juce::TextDiff::Change::appliedTo ( const String original) const
noexcept

Returns the result of applying this change to a string.

Definition at line 217 of file juce_TextDiff.cpp.

◆ isDeletion()

bool juce::TextDiff::Change::isDeletion ( ) const
noexcept

Returns true if this change is a deletion, or false for an insertion.

Definition at line 212 of file juce_TextDiff.cpp.

Member Data Documentation

◆ insertedText

String juce::TextDiff::Change::insertedText

If this change is a deletion, this string will be empty; otherwise, it'll be the text that should be inserted at the index specified by start.

Definition at line 55 of file juce_TextDiff.h.

◆ length

int juce::TextDiff::Change::length

If this change is a deletion, this specifies the number of characters to delete.

For an insertion, this is the length of the new text being inserted.

Definition at line 58 of file juce_TextDiff.h.

◆ start

int juce::TextDiff::Change::start

Specifies the character index in a string at which text should be inserted or deleted.

Definition at line 57 of file juce_TextDiff.h.


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