code: public static boolean isContainedIn(String strToBeSearched, String compositeStr,
           String regex) {
  
          if ((null == strToBeSearched) || (null == compositeStr) || (null == regex))
              return false;
          String[] splitValues = compositeStr.split(regex);
          boolean isFound = false;
          for(int i=0; i<splitValues.length; i++) {
              if(strToBeSearched.equals(splitValues[i].trim())) {
                  isFound = true;
                  break;
              }
          }
          return isFound;
      }
docs: Method which checks whether a string which is having many values
  separated by a delimiter contains a particular value or not
  If the compositeStr is "QC, ATT, L3" & strToBeSearched is "QC"
  & regex is "," then the method will return true.
  @param strToBeSearched the value which needs to be searched for in the
  composite String
  @param compositeStr the String which contains all the values
  separated by a delimiter
  @param regex the delimiting regular expression
  @return