Tabnine Logo
String.toLowerCase
Code IndexAdd Tabnine to your IDE (free)

How to use
toLowerCase
method
in
java.lang.String

Best Java code snippets using java.lang.String.toLowerCase (Showing top 20 results out of 157,041)

origin: ReactiveX/RxJava

public static String timeoutMessage(long timeout, TimeUnit unit) {
  return "The source did not signal an event for "
      + timeout
      + " "
      + unit.toString().toLowerCase()
      + " and has been terminated.";
}
origin: spring-projects/spring-framework

/**
 * Determine whether the given URL points to a jar file itself,
 * that is, has protocol "file" and ends with the ".jar" extension.
 * @param url the URL to check
 * @return whether the URL has been identified as a JAR file URL
 * @since 4.1
 */
public static boolean isJarFileURL(URL url) {
  return (URL_PROTOCOL_FILE.equals(url.getProtocol()) &&
      url.getPath().toLowerCase().endsWith(JAR_FILE_EXTENSION));
}
origin: spring-projects/spring-framework

private int getPort(URI uri) {
  if (uri.getPort() == -1) {
    String scheme = uri.getScheme().toLowerCase(Locale.ENGLISH);
    return ("wss".equals(scheme) ? 443 : 80);
  }
  return uri.getPort();
}
origin: square/okhttp

public Challenge(String scheme, Map<String, String> authParams) {
 if (scheme == null) throw new NullPointerException("scheme == null");
 if (authParams == null) throw new NullPointerException("authParams == null");
 this.scheme = scheme;
 Map<String, String> newAuthParams = new LinkedHashMap<>();
 for (Entry<String, String> authParam : authParams.entrySet()) {
  String key = (authParam.getKey() == null) ? null : authParam.getKey().toLowerCase(US);
  newAuthParams.put(key, authParam.getValue());
 }
 this.authParams = unmodifiableMap(newAuthParams);
}
origin: google/guava

 @Override
 public String apply(String input) {
  return input.toLowerCase();
 }
});
origin: spring-projects/spring-framework

private void updateContentTypeHeader() {
  if (this.contentType != null) {
    StringBuilder sb = new StringBuilder(this.contentType);
    if (!this.contentType.toLowerCase().contains(CHARSET_PREFIX) && this.charset) {
      sb.append(";").append(CHARSET_PREFIX).append(this.characterEncoding);
    }
    doAddHeaderValue(HttpHeaders.CONTENT_TYPE, sb.toString(), true);
  }
}
origin: spring-projects/spring-framework

private boolean isDisconnectedClientError(Throwable ex)  {
  String message = NestedExceptionUtils.getMostSpecificCause(ex).getMessage();
  message = (message != null ? message.toLowerCase() : "");
  String className = ex.getClass().getSimpleName();
  return (message.contains("broken pipe") || DISCONNECTED_CLIENT_EXCEPTIONS.contains(className));
}
origin: spring-projects/spring-framework

private boolean indicatesDisconnectedClient(Throwable ex)  {
  String message = NestedExceptionUtils.getMostSpecificCause(ex).getMessage();
  message = (message != null ? message.toLowerCase() : "");
  String className = ex.getClass().getSimpleName();
  return (message.contains("broken pipe") || DISCONNECTED_CLIENT_EXCEPTIONS.contains(className));
}
origin: spring-projects/spring-framework

/**
 * Convert the given key to a case-insensitive key.
 * <p>The default implementation converts the key
 * to lower-case according to this Map's Locale.
 * @param key the user-specified key
 * @return the key to use for storing
 * @see String#toLowerCase(Locale)
 */
protected String convertKey(String key) {
  return key.toLowerCase(getLocale());
}
origin: spring-projects/spring-framework

@Override
public int hashCode() {
  int result = (isCaseSensitiveName() ? this.name.hashCode() : this.name.toLowerCase().hashCode());
  result = 31 * result + (this.value != null ? this.value.hashCode() : 0);
  result = 31 * result + (this.isNegated ? 1 : 0);
  return result;
}
origin: ReactiveX/RxJava

  @Override
  public String apply(String t1) {
    return t1.trim().toLowerCase();
  }
};
origin: ReactiveX/RxJava

  @Override
  public String apply(String t1) {
    return t1.trim().toLowerCase();
  }
};
origin: spring-projects/spring-framework

  @Override
  public String[] resolve(Class<?> testClass) {
    return new String[] { testClass.getSimpleName().toLowerCase() };
  }
}
origin: square/okhttp

/** Returns true if {@code certificate} matches {@code hostname}. */
private boolean verifyHostname(String hostname, X509Certificate certificate) {
 hostname = hostname.toLowerCase(Locale.US);
 List<String> altNames = getSubjectAltNames(certificate, ALT_DNS_NAME);
 for (String altName : altNames) {
  if (verifyHostname(hostname, altName)) {
   return true;
  }
 }
 return false;
}
origin: spring-projects/spring-framework

private Token eatToken(TokenKind expectedKind) {
  Token t = nextToken();
  if (t == null) {
    int pos = this.expressionString.length();
    throw internalException(pos, SpelMessage.OOD);
  }
  if (t.kind != expectedKind) {
    throw internalException(t.startPos, SpelMessage.NOT_EXPECTED_TOKEN,
        expectedKind.toString().toLowerCase(), t.getKind().toString().toLowerCase());
  }
  return t;
}
origin: ReactiveX/RxJava

File directoryOf(String baseClassName) throws Exception {
  File f = MaybeNo2Dot0Since.findSource("Flowable");
  if (f == null) {
    return null;
  }
  String parent = f.getParentFile().getAbsolutePath().replace('\\', '/');
  if (!parent.endsWith("/")) {
    parent += "/";
  }
  parent += "internal/operators/" + baseClassName.toLowerCase() + "/";
  return new File(parent);
}
origin: spring-projects/spring-framework

@Test
public void test() {
  assertTrue(Arrays.asList(applicationContext.getEnvironment().getActiveProfiles()).contains(
    getClass().getSimpleName().toLowerCase()));
}
origin: spring-projects/spring-framework

private Method getMethodForHttpStatus(HttpStatus status) throws NoSuchMethodException {
  String name = status.name().toLowerCase().replace("_", "-");
  name = "is" + StringUtils.capitalize(Conventions.attributeNameToPropertyName(name));
  return StatusResultMatchers.class.getMethod(name);
}
origin: spring-projects/spring-framework

private void testTransportUrl(String scheme, String expectedScheme, TransportType transportType) throws Exception {
  SockJsUrlInfo info = new SockJsUrlInfo(new URI(scheme + "://example.com"));
  String serverId = info.getServerId();
  String sessionId = info.getSessionId();
  String transport = transportType.toString().toLowerCase();
  URI expected = new URI(expectedScheme + "://example.com/" + serverId + "/" + sessionId + "/" + transport);
  assertThat(info.getTransportUrl(transportType), equalTo(expected));
}
origin: spring-projects/spring-framework

@Test
@EnabledOnMac
void enabledIfWithSpelOsCheckInCustomComposedAnnotation() {
  String os = System.getProperty("os.name").toLowerCase();
  assertTrue(os.contains("mac"), "This test must be enabled on Mac OS");
  assertFalse(os.contains("win"), "This test must be disabled on Windows");
}
java.langStringtoLowerCase

Javadoc

Converts all of the characters in this String to lower case using the rules of the default locale. This is equivalent to calling toLowerCase(Locale.getDefault()).

Note: This method is locale sensitive, and may produce unexpected results if used for strings that are intended to be interpreted locale independently. Examples are programming language identifiers, protocol keys, and HTML tags. For instance, "TITLE".toLowerCase() in a Turkish locale returns "t\u005Cu0131tle", where '\u005Cu0131' is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, use toLowerCase(Locale.ENGLISH).

Popular methods of String

  • equals
  • length
    Returns the number of characters in this string.
  • substring
    Returns a string containing a subsequence of characters from this string. The returned string shares
  • startsWith
    Compares the specified string to this string, starting at the specified offset, to determine if the
  • format
    Returns a formatted string, using the supplied format and arguments, localized to the given locale.
  • split
    Splits this string using the supplied regularExpression. See Pattern#split(CharSequence,int) for an
  • trim
  • valueOf
    Creates a new string containing the specified characters in the character array. Modifying the chara
  • indexOf
  • endsWith
    Compares the specified string to this string to determine if the specified string is a suffix.
  • contains
    Determines if this String contains the sequence of characters in the CharSequence passed.
  • getBytes
  • contains,
  • getBytes,
  • <init>,
  • equalsIgnoreCase,
  • replace,
  • isEmpty,
  • charAt,
  • hashCode,
  • lastIndexOf

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now