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

How to use
toUpperCase
method
in
java.lang.String

Best Java code snippets using java.lang.String.toUpperCase (Showing top 20 results out of 99,360)

origin: ReactiveX/RxJava

  @Override
  public String apply(String s) {
    if (s.equals("x")) {
      return "xx";
    }
    return s.toUpperCase();
  }
};
origin: ReactiveX/RxJava

  @Override
  public String apply(String s) {
    if (s.equals("x")) {
      return "XX";
    }
    return s.toUpperCase();
  }
};
origin: ReactiveX/RxJava

  @Override
  public String apply(String s) {
    if (s.equals("x")) {
      return "xx";
    }
    return s.toUpperCase();
  }
};
origin: ReactiveX/RxJava

  @Override
  public String apply(String s) {
    if (s.equals("x")) {
      return "XX";
    }
    return s.toUpperCase();
  }
};
origin: spring-projects/spring-framework

@Override
@Nullable
public String metaDataSchemaNameToUse(@Nullable String schemaName) {
  if (schemaName != null) {
    return super.metaDataSchemaNameToUse(schemaName);
  }
  // Use current user schema if no schema specified...
  String userName = getUserName();
  return (userName != null ? userName.toUpperCase() : null);
}
origin: spring-projects/spring-framework

@Override
@Nullable
public String metaDataSchemaNameToUse(@Nullable String schemaName) {
  if (schemaName != null) {
    return super.metaDataSchemaNameToUse(schemaName);
  }
  // Use current user schema if no schema specified...
  String userName = getUserName();
  return (userName != null ? userName.toUpperCase() : null);
}
origin: spring-projects/spring-framework

  @Override
  public Object fromMessage(Message message) throws JMSException, MessageConversionException {
    String content = ((TextMessage) message).getText();
    return content.toUpperCase();
  }
}
origin: spring-projects/spring-framework

public static TypeCode forName(String name) {
  String searchingFor = name.toUpperCase();
  TypeCode[] tcs = values();
  for (int i = 1; i < tcs.length; i++) {
    if (tcs[i].name().equals(searchingFor)) {
      return tcs[i];
    }
  }
  return OBJECT;
}
origin: spring-projects/spring-framework

private ServerWebExchange mapExchange(ServerWebExchange exchange, String methodParamValue) {
  HttpMethod httpMethod = HttpMethod.resolve(methodParamValue.toUpperCase(Locale.ENGLISH));
  Assert.notNull(httpMethod, () -> "HttpMethod '" + methodParamValue + "' not supported");
  if (ALLOWED_METHODS.contains(httpMethod)) {
    return exchange.mutate().request(builder -> builder.method(httpMethod)).build();
  }
  else {
    return exchange;
  }
}
origin: spring-projects/spring-framework

@Override
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
  return new StubTextMessage(object.toString().toUpperCase());
}
origin: spring-projects/spring-framework

@PostMapping("/completable-future")
public CompletableFuture<Person> transformCompletableFuture(
    @RequestBody CompletableFuture<Person> personFuture) {
  return personFuture.thenApply(person -> new Person(person.getName().toUpperCase()));
}
origin: apache/incubator-dubbo

private String getValueFromConfig(ProtocolConfig protocolConfig, String key) {
  String protocolPrefix = protocolConfig.getName().toUpperCase() + "_";
  String port = ConfigUtils.getSystemProperty(protocolPrefix + key);
  if (StringUtils.isEmpty(port)) {
    port = ConfigUtils.getSystemProperty(key);
  }
  return port;
}
origin: apache/incubator-dubbo

private String getValueFromConfig(ProtocolConfig protocolConfig, String key) {
  String protocolPrefix = protocolConfig.getName().toUpperCase() + "_";
  String port = ConfigUtils.getSystemProperty(protocolPrefix + key);
  if (StringUtils.isEmpty(port)) {
    port = ConfigUtils.getSystemProperty(key);
  }
  return port;
}
origin: spring-projects/spring-framework

@PostMapping("/publisher")
public Publisher<Person> transformPublisher(@RequestBody Publisher<Person> persons) {
  return Flux
      .from(persons)
      .map(person -> new Person(person.getName().toUpperCase()));
}
origin: google/guava

public void testFromStringFailsWithUpperCaseString() {
 String string = Hashing.sha1().hashString("foo", Charsets.US_ASCII).toString().toUpperCase();
 try {
  HashCode.fromString(string);
  fail();
 } catch (IllegalArgumentException expected) {
 }
}
origin: spring-projects/spring-framework

  @Override
  public String getAsText() {
    return ObjectUtils.nullSafeToString(getValue()).toUpperCase();
  }
}
origin: spring-projects/spring-framework

  @PostMapping("/flowable")
  public Flowable<Person> transformFlowable(@RequestBody Flowable<Person> persons) {
    return persons.map(person -> new Person(person.getName().toUpperCase()));
  }
}
origin: spring-projects/spring-framework

@PostMapping("/single")
public Single<Person> transformSingle(@RequestBody Single<Person> personFuture) {
  return personFuture.map(person -> new Person(person.getName().toUpperCase()));
}
origin: spring-projects/spring-framework

@PostMapping("/rxjava2-maybe")
public Maybe<Person> transformRxJava2Maybe(@RequestBody Maybe<Person> personFuture) {
  return personFuture.map(person -> new Person(person.getName().toUpperCase()));
}
origin: google/guava

 @GwtIncompatible // String.toUpperCase() has browser semantics
 public void testEqualsIgnoreCaseUnicodeEquivalence() {
  // Note that it's possible in future that the JDK's idea to toUpperCase() or equalsIgnoreCase()
  // may change and break assumptions in this test [*]. This is not a bug in the implementation of
  // Ascii.equalsIgnoreCase(), but it is a signal that its documentation may need updating as
  // regards edge cases.

  // The Unicode point {@code 00df} is the lowercase form of sharp-S (ß), whose uppercase is "SS".
  assertEquals("PASSWORD", "pa\u00dfword".toUpperCase()); // [*]
  assertFalse("pa\u00dfword".equalsIgnoreCase("PASSWORD")); // [*]
  assertFalse(Ascii.equalsIgnoreCase("pa\u00dfword", "PASSWORD"));
 }
}
java.langStringtoUpperCase

Javadoc

Converts all of the characters in this String to upper case using the rules of the default locale. This method is equivalent to toUpperCase(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".toUpperCase() in a Turkish locale returns "T\u005Cu0130TLE", where '\u005Cu0130' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character. To obtain correct results for locale insensitive strings, use toUpperCase(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.
  • toLowerCase
    Converts this string to lower case, using the rules of locale.Most case mappings are unaffected by t
  • contains
    Determines if this String contains the sequence of characters in the CharSequence passed.
  • toLowerCase,
  • 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
  • Best plugins for Eclipse
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