Get {@link java.lang.String} before given search {@link java.lang.String} from given start search index.

@param src
source string
@param toSearch
search string
@param start
start search index
@return {@link java.lang.String}
329940
public static String getStringBefore(final String src, final String toSearch, final int start) {
		final int ind = src.indexOf(toSearch, start);
		if (ind == -1)
			return "";

		return src.substring(start, ind);
	}
942382
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
	public int getTotalPaddingStart (){
		if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
			return getPaddingStart() + mInputView.getTotalPaddingStart();

		return getTotalPaddingLeft();
	}
1335655
private SearchFilter getSearchFilter(HttpServletRequest httpServletRequest) {
        SearchFilter ret = new SearchFilter();
        Set<String> keySet = httpServletRequest.getParameterMap().keySet();
        for (String key : keySet) {
            ret.setParam(String.valueOf(key), String.valueOf(httpServletRequest.getParameter(key)));
        }

        return ret;
    }
1096921
private String findSearchStrings(final int start) {
		String longestMatch = null;

		// Loop for each string
		for (int i = 0; i < search.length; i++) {
			// No point checking a String that's too long
			if (start + search[i].length() > bufferLen) {
				continue;
			}

			boolean found = true;

			// Loop for each character in range
			for (int j = 0; j < search[i].length() && (start + j < bufferLen); j++) {
				int diff = buffer[start + j] - search[i].charAt(j);

				if (diff < 0) {
					// Since the strings are all sorted, we can abort if
					// the character is less than the corresponding character in
					// the current search string.
					return longestMatch;
				} else if (diff != 0) {
					found = false;
					break;
				}
			}

			if (found && (longestMatch == null || longestMatch.length() < search[i].length())) {
				longestMatch = search[i];
			}
		}

		return longestMatch;
	}
1079919
public String getContent(int start, int end) throws IOException
	{
		// bug, 混合回车符号也许定位不到准确行数？
		String lineSeparator = System.getProperty("line.separator");
		Reader br  = null;
		try {
			br = openReader();
			BufferedReader reader = new BufferedReader(br);
			String line = null;
			StringBuilder sb = new StringBuilder();
			int index = 0;
			while((line=reader.readLine())!=null){
				index++;
				if(index>=start&&index<=end){
					sb.append(line).append(lineSeparator);
					if(index==end){
						break;
					}
				}
			}
			return sb.toString();
		}finally {
			if(br!=null) {
				br.close();
			}
		}
		

	

	}
248306
@Nullable
  public IndexSearcher getSearcher () throws IOException
  {
    _checkClosing ();
    final IndexReader aReader = getReader ();
    if (aReader == null)
    {
      // Index not readable
      LOGGER.warn ("Index not readable");
      return null;
    }

    if (m_aSearchReader == aReader)
    {
      // Reader did not change - use cached searcher
      assert m_aSearcher != null;
    }
    else
    {
      // Create new searcher only if necessary
      m_aSearchReader = aReader;
      m_aSearcher = new IndexSearcher (aReader);
    }
    return m_aSearcher;
  }
304706
public HashSet<String> getStringsStartingWith(String prefixStr)
    {
        HashSet<String> strHashSet = new HashSet<String>();

        if (sourceNode != null)      //if the MDAG hasn't been simplified
        {
            MDAGNode originNode = sourceNode.transition(prefixStr);  //attempt to _transition down the path denoted by prefixStr

            if (originNode != null) //if there a _transition path corresponding to prefixString (one or more stored Strings begin with prefixString)
            {
                if (originNode.isAcceptNode()) strHashSet.add(prefixStr);
                getStrings(strHashSet, SearchCondition.PREFIX_SEARCH_CONDITION, prefixStr, prefixStr, originNode.getOutgoingTransitions());   //retrieve all Strings that extend the _transition path denoted by prefixStr
            }
        }
        else
        {
            SimpleMDAGNode originNode = SimpleMDAGNode.traverseMDAG(mdagDataArray, simplifiedSourceNode, prefixStr);      //attempt to _transition down the path denoted by prefixStr

            if (originNode != null)      //if there a _transition path corresponding to prefixString (one or more stored Strings begin with prefixStr)
            {
                if (originNode.isAcceptNode()) strHashSet.add(prefixStr);
                getStrings(strHashSet, SearchCondition.PREFIX_SEARCH_CONDITION, prefixStr, prefixStr, originNode);        //retrieve all Strings that extend the _transition path denoted by prefixString
            }
        }

        return strHashSet;
    }
179433
public LinkedList<Map.Entry<String, V>> commonPrefixSearchWithValue(String key)
    {
        char[] chars = key.toCharArray();
        return commonPrefixSearchWithValue(chars, 0);
    }
875492
public LinkedList<Entry<String, V>> commonPrefixSearchWithValue(String key)
    {
        return commonPrefixSearchWithValue(key.toCharArray(), 0);
    }
1018541
public static final boolean startsWith(char[] array, char[] toBeFound)
	{
		int i = toBeFound.length;
		if (array.length < i)
		{
			return false;
		}
		while (--i >= 0)
		{
			if (toBeFound[i] != array[i])
			{
				return false;
			}
		}
		return true;
	}
1251760
public final boolean getSet(char src[], int srcStart) {
        // leave most argument checking up to Java exceptions
        array=null;
        arrayOffset=bmpLength=length=0;

        length=src[srcStart++];
        
        if ((length&0x8000) != 0) {
            /* there are supplementary values */
            length&=0x7fff;
            if(src.length<(srcStart+1+length)) {
                length=0;
                throw new IndexOutOfBoundsException();
            }
            bmpLength=src[srcStart++];
        } else {
            /* only BMP values */
            if(src.length<(srcStart+length)) {
                length=0;
                throw new IndexOutOfBoundsException();
            }
            bmpLength=length;
        }
        array = new char[length];
        System.arraycopy(src,srcStart,array,0,length);
        //arrayOffset=srcStart;
        return true;
    }
462404
private void beginSearch() throws RemoteException {
        org.fcrepo.server.types.gen.FieldSearchQuery genFieldSearchQuery =
                TypeUtility.convertFieldSearchQueryToGenFieldSearchQuery(query);
        org.fcrepo.server.types.gen.FieldSearchResult searchResult =
                apia.findObjects(org.fcrepo.server.utilities.TypeUtility.convertStringtoAOS(OBJECT_RESULT_FIELDS),
                                 MAX_FIND_RESULTS,
                                 genFieldSearchQuery);
        FieldSearchResult fsr =
                TypeUtility
                        .convertGenFieldSearchResultToFieldSearchResult(searchResult);
        for (ObjectFields fields : fsr.objectFieldsList()) {
            stash.add(fields.getPid());
        }
        token = fsr.getToken();
    }
190460
public final List<T> searchSorted(String searchString, String sort) {
        return this.findSortedByQuery(FULLTEXT_QUERY, sort, searchString);
    }
1356042
public static Treenode search(Treenode start, String text, ITreenodeSearch search) {
        return search(start.getTreeview(), text, search);
    }
1075805
public CloseableIterator<CaptureSearchResult> getPrefixIterator(String prefix)
			throws ResourceIndexNotAvailableException {

		Comparator<CaptureSearchResult> comparator = new SearchResultComparator();
		CompositeSortedIterator<CaptureSearchResult> itr = new CompositeSortedIterator<CaptureSearchResult>(comparator);
		
		int added = 0;
		ResourceIndexNotAvailableException lastExc = null;
		
		for (int i = 0; i < sources.size(); i++) {
			SearchResultSource source = sources.get(i);
			
			try {
				itr.addComponent(source.getPrefixIterator(prefix));
				added++;
			} catch (ResourceIndexNotAvailableException e) {
				if (source instanceof ZipNumClusterSearchResultSource) {
					if (((ZipNumClusterSearchResultSource)source).getCluster().isRequired()) {
						throw e;
					}
				}
				
				lastExc = e;
			}
		}
		
		if ((lastExc != null) && (added == 0)) {
			try {
				itr.close();
			} catch (IOException io) {
				
			}
			throw lastExc;
		}
		
		return itr;
	}
775156
private StringBuffer toQueryPrefixNoSelect(String t) {

        StringBuffer sb = new StringBuffer(255);

        return sb.append(t).append(whereTrue);
    }
1251879
function (str, findChar, start) {
            var index = str.indexOf(findChar, start);
            while (index != -1) {
                if (!this.isEscaped(str, index)) {
                    return index;
                }
                // continue search after escaped character
                index = str.indexOf(findChar, index + 1);
            }
            return -1;
        }