Here you can find the source of hasCharAt(char toLookFor, int position, char[] toSearch)
public static final boolean hasCharAt(char toLookFor, int position, char[] toSearch)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w w w . j ava2 s .co m*/ * IBM Corporation - initial API and implementation * Andrew Ferguson (Symbian) * Markus Schorn (Wind River Systems) * Sergey Prigogin (Google) *******************************************************************************/ public class Main { /** * Returns true iff the given array contains the given char at the given position */ public static final boolean hasCharAt(char toLookFor, int position, char[] toSearch) { if (toSearch.length <= position) { return false; } return toSearch[position] == toLookFor; } }