mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-3871 Added option to remove quotes from string before being added to clipboard
This commit is contained in:
parent
cb141a391d
commit
baf5e11fc9
4 changed files with 60 additions and 15 deletions
|
@ -20,7 +20,7 @@ import java.io.IOException;
|
|||
|
||||
public class StringTransferable implements Transferable {
|
||||
|
||||
private String data = null;
|
||||
protected String data = null;
|
||||
private DataFlavor[] flavors = { DataFlavor.stringFlavor };
|
||||
|
||||
public StringTransferable(String data) {
|
||||
|
@ -42,4 +42,13 @@ public class StringTransferable implements Transferable {
|
|||
throws UnsupportedFlavorException, IOException {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void removeOuterQuotes() {
|
||||
if (data.length() < 2) {
|
||||
return;
|
||||
}
|
||||
if (data.charAt(0) == '"' && data.charAt(data.length() - 1) == '"') {
|
||||
data = data.substring(1, data.length() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue