List of usage examples for org.apache.commons.lang StringUtils substringsBetween
public static String[] substringsBetween(String str, String open, String close)
Searches a String for substrings delimited by a start and end tag, returning all matching substrings in an array.
From source file:org.wso2.identity.integration.test.saml.SAMLFederationWithFileBasedSPAndIDPTestCase.java
private Map<String, String> extractClaims(String claimString) { String[] dataArray = StringUtils.substringsBetween(claimString, "<td>", "</td>"); Map<String, String> attributeMap = new HashMap<String, String>(); String key = null;/*from ww w . java 2 s . co m*/ String value; for (int i = 0; i < dataArray.length; i++) { if ((i % 2) == 0) { key = dataArray[i]; } else { value = dataArray[i].trim(); attributeMap.put(key, value); } } return attributeMap; }
From source file:org.wso2.identity.integration.test.saml.SAMLQueryProfileTestCase.java
private void assertNoneClaims(String claims) { String[] dataArray = StringUtils.substringsBetween(claims, "<td>", "</td>"); Assert.assertNull(dataArray, "Claims are not expected for " + config); }
From source file:shelper.ifmock.HttpMock.java
public String[] saveParamsLeftstrRightstr(String left, String right) { String[] result = StringUtils.substringsBetween(requestedbody, left, right); Reporter.log("httpmock?request\n" + left + "\n?" + right + "\n", true); for (String a : result) { Reporter.log(a, true);/*from www. jav a2s . co m*/ } return result; }
From source file:uk.ac.ebi.atlas.acceptance.selenium.pages.HeatmapTablePage.java
public List<String> getDiffGradientColors() { WebElement element = diffHeatmapTableLegend.findElement(By.className("color-gradient")); String style = element.getCssValue("background-image"); return Lists.newArrayList(StringUtils.substringsBetween(style, "rgb(", ")")); }