Package ghidra.util
Class StringDiff
- java.lang.Object
-
- ghidra.util.StringDiff
-
public class StringDiff extends java.lang.ObjectContainer object that holds a start and end position within a string. A list of StringDiffs is used to keep track of changes made to a string.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringinsertDataString being inserted.intpos1Start position of the string.intpos2End position of the string used when part of the string is replaced.
-
Constructor Summary
Constructors Constructor Description StringDiff(int pos1, int pos2)Construct a new StringDiff that indicates text was deleted from pos1 to pos2.StringDiff(int pos1, int pos2, java.lang.String data)Construct a new StringDiff that indicates given data is inserted from pos1 to pos2.StringDiff(int pos, java.lang.String insertData)Construct a new StringDiff that indicates that insertData was inserted at pos.StringDiff(java.lang.String replaceData)Construct a new StringDiff with pos1 and pos2 are initialized to -1.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringtoString()
-
-
-
Constructor Detail
-
StringDiff
public StringDiff(java.lang.String replaceData)
Construct a new StringDiff with pos1 and pos2 are initialized to -1.- Parameters:
replaceData- string
-
StringDiff
public StringDiff(int pos1, int pos2)Construct a new StringDiff that indicates text was deleted from pos1 to pos2.- Parameters:
pos1- position 1 for the diffpos2- position 2 for the diff
-
StringDiff
public StringDiff(int pos, java.lang.String insertData)Construct a new StringDiff that indicates that insertData was inserted at pos.- Parameters:
pos- position where the insertData was insertedinsertData- inserted string
-
StringDiff
public StringDiff(int pos1, int pos2, java.lang.String data)Construct a new StringDiff that indicates given data is inserted from pos1 to pos2.- Parameters:
pos1- position 1pos2- position 2data- data the replaces string data
-
-