Java String Starts Wtih startsWithNoCase(String csValue, String csStart)

Here you can find the source of startsWithNoCase(String csValue, String csStart)

Description

starts With No Case

License

LGPL

Declaration

public static boolean startsWithNoCase(String csValue, String csStart) 

Method Source Code

//package com.java2s;
/*//from   w w  w . j  av  a2 s  . c  o  m
 * JLib - Publicitas Java library v1.2.0.
 *
 * Copyright (c) 2005, 2006, 2007, 2008, 2009 Publicitas SA.
 * Licensed under LGPL (LGPL-LICENSE.txt) license.
 */

public class Main {
    public static boolean startsWithNoCase(String csValue, String csStart) {
        csValue = csValue.toUpperCase();
        csStart = csStart.toUpperCase();
        return csValue.startsWith(csStart);
    }

    public static boolean startsWithNoCase(String csValue, String csStart, int nOffset) {
        csValue = csValue.toUpperCase();
        csStart = csStart.toUpperCase();
        return csValue.startsWith(csStart, nOffset);
    }
}

Related

  1. startsWithLinuxRoot(String path)
  2. startsWithLowerCase(String text)
  3. startsWithLowerCaseChar(String s)
  4. startsWithMultiple(String string, String... starts)
  5. startsWithName(String subject, String beginName)
  6. startsWithOne(final String src, final String[] dest)
  7. startsWithOneOf(String source, boolean ignoreCase, String... values)
  8. startsWithOneOf(String str, String... strs)
  9. startsWithOneOf(String string, String... prefixes)