How to get a certain part of a string array if it contains a value
<pre><code>String sArr = "ads,Distribution;8,0.1%;10,2.6%;15,2.3%";
String sStrip = sArr.replace(" ", "").split(";");
string sAp = {"7","8","9","10","11"};

boolean blC = Arrays.asList(sStrip).contains(sAp[1]); //this returns false...
String getPerc = ""; //If I use `.contains(sAp[3])` should return `2.6%`
</code></pre>

<p>Here is a sample app pseudocode:</p>

<pre><code>for each `sAp`
     check to see if the `sAp` value exist in `sStrip`[0].
          if `sAp` exist in `sStrip`[0]
               get the second part of the found match

`sApp` = 7
`sStrip` doesn't have a 7... do nothing

`sApp` = 8
`sString does have a 8, return 0.1%

...
</code></pre>

<p>How can I get the value in <code>getPerc</code></p>

<p>tried this, didn't work:</p>

<pre><code>for(String s : sStrip) {
    if (sAp[3].contains(s)) {
        tes = s.split(",")[1];
    }
    else {
        tes = "0%";
    }
}
</code></pre>

<p>The <code>sAp[i]</code> matches the first section of <code>sStrip</code>. so <code>ads,8,10,15</code> not <code>Distribution,0.1%,2.6%,2.3%</code>.</p>