Search target string to find the first index of any string in the given string array, starting at the specified index

@param target
@param fromIndex
@param indexWith
@return
761047
public static int indexAny(String target, Integer fromIndex, String... indexWith) {
		return indexAny(target, fromIndex, Arrays.asList(indexWith));
	}
239630
protected final Token lookahead(int index) throws ScanException, ParseException {
		if (lookahead.isEmpty()) {
			lookahead = new LinkedList<LookaheadToken>();
		}
		while (index >= lookahead.size()) {
			lookahead.add(new LookaheadToken(scanner.next(), scanner.getPosition()));
		}
		return lookahead.get(index).token;
	}
1272958
public static void setIndex(Matcher matcher, int idx) {
        int count = getCount(matcher);
        if (idx < -count || idx >= count) {
            throw new IndexOutOfBoundsException("index is out of range " + (-count) + ".." + (count - 1) + " (index = " + idx + ")");
        }
        if (idx == 0) {
            matcher.reset();
        } else if (idx > 0) {
            matcher.reset();
            for (int i = 0; i < idx; i++) {
                matcher.find();
            }
        } else if (idx < 0) {
            matcher.reset();
            idx += getCount(matcher);
            for (int i = 0; i < idx; i++) {
                matcher.find();
            }
        }
    }
737768
public static int indexOfIgnoreCase( String text , String needle , int fromIndex )
    {
        int textLen = text.length();
        int needleLen = needle.length();
        
        if (fromIndex >= textLen) return needleLen == 0 ? textLen : -1;
        int i = fromIndex;
        if (i < 0)
        	i = 0;
        if (needleLen == 0) return i;
        
        char first = Character.toUpperCase(needle.charAt(0));
        int max = textLen - needleLen;
        
        startSearchForFirstChar:
        while (true)
        {
            // Look for first character.
            while (i <= max)
            {
                char c = Character.toUpperCase(text.charAt(i));
                if (c != first)
                    i++;
                else
                    break;
            }
            if (i > max) return -1;
            
            // Found first character, now look at the rest of the string
            int j = i + 1;
            int end = j + needleLen - 1;
            int k = 1;
            while (j < end) 
            {
                char c1 = Character.toUpperCase(text.charAt(j++));
                char c2 = Character.toUpperCase(needle.charAt(k++));
                if (c1 != c2) 
                {
                    i++;
                    // Look for str's first char again.
                    continue startSearchForFirstChar;
                }
             }
            
            return i;
        }
    }
229830
private static int indexMiddle(
		BinaryString pattern, MemorySegment[] segments, int start, int len) {
		return SegmentsUtil.find(
				segments, start, len,
				pattern.getSegments(), pattern.getOffset(), pattern.getSizeInBytes());
	}
5627
protected final Object arrayLookup(Object array, int index) {
        LOGGER.trace("get value from array index " + index);
        return Array.get(array, index);
    }
164899
public void setIndex(String indexName) {

        resetLastResult();
        if (CmsStringUtil.isNotEmpty(indexName)) {
            try {
                I_CmsSearchIndex idx = OpenCms.getSearchManager().getIndex(indexName);
                CmsSearchIndex index = idx instanceof CmsSearchIndex ? (CmsSearchIndex)idx : null;
                if (index == null) {
                    throw new CmsException(Messages.get().container(Messages.ERR_INDEX_NOT_FOUND_1, indexName));
                }
                m_parameters.setSearchIndex(index);
            } catch (Exception exc) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug(Messages.get().getBundle().key(Messages.LOG_INDEX_ACCESS_FAILED_1, indexName), exc);
                }
                m_lastException = exc;
            }
        }
    }
296184
public void setIndex(String indexName) throws CmsException {

        if (CmsStringUtil.isEmpty(indexName)) {
            throw new CmsException(Messages.get().container(Messages.ERR_INDEXSOURCE_CREATE_MISSING_NAME_0));
        }
        CmsSolrIndex index = OpenCms.getSearchManager().getIndexSolr(indexName);
        if (index == null) {
            throw new CmsException(Messages.get().container(Messages.ERR_INDEX_NOT_FOUND_1, indexName));
        }

        m_index = index;

    }
631962
@Override
	public List<V> subList(final int fromIndex, final int toIndex) {
		return this.list.subList(fromIndex, toIndex);
	}
301035
public Seq<T> slice(final int fromIndex, final int toIndex) {
        N.checkFromToIndex(fromIndex, toIndex, size());

        if (N.isNullOrEmpty(coll)) {
            return this;
        }

        if (coll instanceof List) {
            return new Seq<T>(((List<T>) coll).subList(fromIndex, toIndex));
        }

        return new Seq<T>(new SubCollection<>(coll, fromIndex, toIndex));
    }
343498
public static boolean containsIgnoreCase(final String source, final String target) {

    if (source != null && target != null) {
      return indexOfIgnoreCase(source, target) != INDEX_OF_NOT_FOUND;
    } else {
      return false;
    }
  }
343632
function project(value, fromIndex) {
  var index = fromIndex
  var length = value.length
  var size

  while (index < length) {
    if (!projectCharacter(value.charCodeAt(index))) {
      break
    }

    index++
  }

  size = fromIndex - index

  if (
    !size ||
    size > MAX_PROJECT_LENGTH ||
    value.slice(index - GIT_SUFFIX.length, index) === GIT_SUFFIX
  ) {
    return -1
  }

  return index
}
340397
public static INDArray firstIndex(INDArray array, Condition condition, int... dimension) {
        if (!(condition instanceof BaseCondition))
            throw new UnsupportedOperationException("Only static Conditions are supported");

        return Nd4j.getExecutioner().exec(new FirstIndex(array, condition, dimension));
    }
48514
@NonNull
  public static CreateIndexStart createIndex(@Nullable String indexName) {
    return createIndex(indexName == null ? null : CqlIdentifier.fromCql(indexName));
  }
802075
private static int indexOf(CharSequence cs, CharSequence searchChar, int start) {
    return cs.toString().indexOf(searchChar.toString(), start);
  }
1169529
private static int  js_indexOf(int methodId, String target, Object[] args) {
        String searchStr = ScriptRuntime.toString(args, 0);
        double position = ScriptRuntime.toInteger(args, 1);

        if (position > target.length() && methodId != Id_startsWith && methodId != Id_endsWith) {
            return -1;
        }

        if (position < 0) position = 0;
        else if (position > target.length()) position = target.length();
        else if (methodId == Id_endsWith && (position != position  || position > target.length())) position = target.length();

        if (Id_endsWith == methodId) {
            if (args.length == 0 || args.length == 1 || (args.length == 2 && args[1] == Undefined.instance)) position = target.length();
            return target.substring(0, (int)position).endsWith(searchStr) ? 0 : -1;
        }
        return methodId == Id_startsWith
                ? target.startsWith(searchStr, (int)position) ? 0 : -1
                : target.indexOf(searchStr, (int)position);
    }
1039886
public static int indexOf(ByteBuf buffer, int fromIndex, int toIndex, byte value) {
        if (fromIndex <= toIndex) {
            return firstIndexOf(buffer, fromIndex, toIndex, value);
        } else {
            return lastIndexOf(buffer, fromIndex, toIndex, value);
        }
    }