String comparison

Discussion in 'Plugin Development' started by MoeMix, Jul 8, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    MoeMix

    Hi I have two different strings and I'm trying to iterate through each of the characters and find where there are differences. I have created the strings and gathered a list of characters but I'm stuck on the comparison method.. Any help would be appreciated. Thanks!
    Code:java
    1. String DNAinput = player.getDNAnucleotides();
    2. String referance = player.getBasicGenome();
    3.  
    4. ArrayList<Character> DNAchars = new ArrayList<Character>();
    5. ArrayList<Character> REFchars = new ArrayList<Character>();
    6.  
    7. for(char nucleotide : DNAinput.toCharArray()){
    8. DNAchars.add(nucleotide);
    9. }
    10. for(char refNucleotide : referance.toCharArray()){
    11. REFchars.add(refNucleotide);
    12. }
     
Thread Status:
Not open for further replies.

Share This Page