Hello,
I have two strings of letters (columns String A and String B) and I want to transform them into strings like the ones in Solution 1 and Solution 2 correspondingly.
In the case of String A, I need to remove any adjacent duplicate characters, so the string ZPDUU would turn into ZPDU.
String B is a little bit more complicated: both String A and String B have the same length; and I want to transform String 2 depending on the transformation of String 1 into Solution 1. For example, in my data, I have ZPDUU as String 1 and OOBOO as String 2. Solution 1 would be ZPDU (remove duplicate characters) and Solution 2 would be OOBO (remove characters that are in the same position as the characters removed from String 1).
I hope this makes sense and I'm happy to provide any further clarification.
Thanks in advance,
alecambo
I have two strings of letters (columns String A and String B) and I want to transform them into strings like the ones in Solution 1 and Solution 2 correspondingly.
In the case of String A, I need to remove any adjacent duplicate characters, so the string ZPDUU would turn into ZPDU.
String B is a little bit more complicated: both String A and String B have the same length; and I want to transform String 2 depending on the transformation of String 1 into Solution 1. For example, in my data, I have ZPDUU as String 1 and OOBOO as String 2. Solution 1 would be ZPDU (remove duplicate characters) and Solution 2 would be OOBO (remove characters that are in the same position as the characters removed from String 1).
I hope this makes sense and I'm happy to provide any further clarification.
String A | String B | Solution 1 | Solution 2 | |||
|
| ZPDU | OOBO | |||
|
| OJGDU | UOOBO | |||
|
| ZFD | UOB | |||
|
| JIKSHWQT |
|
Thanks in advance,
alecambo