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

How to use
copyValueOf
method
in
java.lang.String

Best Java code snippets using java.lang.String.copyValueOf (Showing top 20 results out of 1,827)

origin: google/guava

/**
 * Returns the Java Unicode escape sequence for the given {@code char}, in the form "\u12AB" where
 * "12AB" is the four hexadecimal digits representing the 16-bit code unit.
 */
private static String showCharacter(char c) {
 String hex = "0123456789ABCDEF";
 char[] tmp = {'\\', 'u', '\0', '\0', '\0', '\0'};
 for (int i = 0; i < 4; i++) {
  tmp[5 - i] = hex.charAt(c & 0xF);
  c = (char) (c >> 4);
 }
 return String.copyValueOf(tmp);
}
origin: prestodb/presto

/**
 * Returns the Java Unicode escape sequence for the given {@code char}, in the form "\u12AB" where
 * "12AB" is the four hexadecimal digits representing the 16-bit code unit.
 */
private static String showCharacter(char c) {
 String hex = "0123456789ABCDEF";
 char[] tmp = {'\\', 'u', '\0', '\0', '\0', '\0'};
 for (int i = 0; i < 4; i++) {
  tmp[5 - i] = hex.charAt(c & 0xF);
  c = (char) (c >> 4);
 }
 return String.copyValueOf(tmp);
}
origin: google/j2objc

/**
 * Returns the Java Unicode escape sequence for the given {@code char}, in the form "\u12AB" where
 * "12AB" is the four hexadecimal digits representing the 16-bit code unit.
 */
private static String showCharacter(char c) {
 String hex = "0123456789ABCDEF";
 char[] tmp = {'\\', 'u', '\0', '\0', '\0', '\0'};
 for (int i = 0; i < 4; i++) {
  tmp[5 - i] = hex.charAt(c & 0xF);
  c = (char) (c >> 4);
 }
 return String.copyValueOf(tmp);
}
origin: wildfly/wildfly

/**
 * Returns the Java Unicode escape sequence for the given {@code char}, in the form "\u12AB" where
 * "12AB" is the four hexadecimal digits representing the 16-bit code unit.
 */
private static String showCharacter(char c) {
 String hex = "0123456789ABCDEF";
 char[] tmp = {'\\', 'u', '\0', '\0', '\0', '\0'};
 for (int i = 0; i < 4; i++) {
  tmp[5 - i] = hex.charAt(c & 0xF);
  c = (char) (c >> 4);
 }
 return String.copyValueOf(tmp);
}
origin: libgdx/libgdx

  public final String toString () {
    return String.copyValueOf(backingArray, offset + position, remaining());
  }
}
origin: qiujiayu/AutoLoadCache

@Override
public Object deepClone(Object obj, final Type type) {
  if (null == obj) {
    return obj;
  }
  String str = (String) obj;
  return String.copyValueOf(str.toCharArray());
}
origin: libgdx/libgdx

  public final String toString () {
    return String.copyValueOf(backingArray, offset + position, remaining());
  }
}
origin: oracle/helidon

/**
 * Returns the Java Unicode escape sequence for the given character, in the form "\u12AB" where
 * "12AB" is the four hexadecimal digits representing the 16 bits of the UTF-16 character.
 */
private static String showCharacter(char c) {
  String hex = "0123456789ABCDEF";
  char[] tmp = {'\\', 'u', '\0', '\0', '\0', '\0'};
  for (int i = 0; i < 4; i++) {
    tmp[5 - i] = hex.charAt(c & 0xF);
    c = (char) (c >> 4);
  }
  return String.copyValueOf(tmp);
}
origin: google/guava

 @Override
 public List<Character> create(Character[] elements) {
  char[] chars = Chars.toArray(Arrays.asList(elements));
  return Lists.charactersOf(String.copyValueOf(chars));
 }
}
origin: facebook/litho

private static String getBasePropMatcherName(final MethodParamModel prop, final String suffix) {
 final String name = prop.getName();
 final int fst = Character.toUpperCase(name.codePointAt(0));
 return 'm'
   + String.copyValueOf(Character.toChars(fst))
   + name.substring(name.offsetByCodePoints(0, 1))
   + suffix;
}
origin: pentaho/pentaho-kettle

@Override
public void print( char[] s ) {
 log.logDebug( String.copyValueOf( s ) );
}
origin: pentaho/pentaho-kettle

@Override
public void println( char[] s ) {
 log.logDebug( String.copyValueOf( s ) + Const.CR );
}
origin: robovm/robovm

 @Override public final String toString() {
  return String.copyValueOf(backingArray, arrayOffset + position, remaining());
 }
}
origin: jmxtrans/jmxtrans

@Override
public void write(char[] cbuf, int off, int len) throws IOException {
  logger.info(String.copyValueOf(cbuf, off, len).replace("\n", "").replace(" ", delimiter));
}

origin: syncany/syncany

@Override
public String onUserPassword(String header, String message) {
  if (!isInteractive) {
    throw new RuntimeException("Repository is encrypted, but no password was given in non-interactive mode.");
  }
  out.println();
  if (header != null) {
    out.println(header);
    out.println(Strings.repeat("-", header.length()));
  }
  if (!message.trim().endsWith(":")) {
    message += ": ";
  }
  char[] passwordChars = console.readPassword(message);
  return String.copyValueOf(passwordChars);
}
origin: google/guava

@AndroidIncompatible // slow
@GwtIncompatible // Floats.tryParse
public void testTryParseAllCodePoints() {
 // Exercise non-ASCII digit test cases and the like.
 char[] tmp = new char[2];
 for (int i = Character.MIN_CODE_POINT; i < Character.MAX_CODE_POINT; i++) {
  Character.toChars(i, tmp, 0);
  checkTryParse(String.copyValueOf(tmp, 0, Character.charCount(i)));
 }
}
origin: google/guava

@AndroidIncompatible // slow
@GwtIncompatible // Doubles.tryParse
public void testTryParseAllCodePoints() {
 // Exercise non-ASCII digit test cases and the like.
 char[] tmp = new char[2];
 for (int i = Character.MIN_CODE_POINT; i < Character.MAX_CODE_POINT; i++) {
  Character.toChars(i, tmp, 0);
  checkTryParse(String.copyValueOf(tmp, 0, Character.charCount(i)));
 }
}
origin: Alluxio/alluxio

 private void validateCallbacks(String user, String passwd, Callback[] callbacks)
   throws IOException, UnsupportedCallbackException {
  for (Callback cb : callbacks) {
   if (cb instanceof NameCallback) {
    assertEquals(user, ((NameCallback) cb).getName());
   } else if (cb instanceof PasswordCallback) {
    char[] passwordChar = ((PasswordCallback) cb).getPassword();
    assertEquals(passwd, passwordChar == null ? null : String.copyValueOf(passwordChar));
   }
  }
 }
}
origin: marytts/marytts

  public void read(MaryRandomAccessFile stream) throws IOException {
    featureDimension = stream.readIntEndian();
    totalComponents = stream.readIntEndian();
    isDiagonalCovariance = stream.readBooleanEndian();
    int tmpLen = stream.readIntEndian();
    if (tmpLen > 0)
      info = String.copyValueOf(stream.readCharEndian(tmpLen));

    weights = stream.readDoubleEndian(totalComponents);

    components = new GaussianComponent[totalComponents];
    for (int i = 0; i < totalComponents; i++) {
      components[i] = new GaussianComponent();
      components[i].read(stream);
    }
  }
}
origin: marytts/marytts

  public void read(MaryRandomAccessFile stream) throws IOException {
    featureDimension = stream.readIntEndian();
    totalComponents = stream.readIntEndian();
    isDiagonalCovariance = stream.readBooleanEndian();
    int tmpLen = stream.readIntEndian();
    if (tmpLen > 0)
      info = String.copyValueOf(stream.readCharEndian(tmpLen));

    weights = stream.readDoubleEndian(totalComponents);

    components = new GaussianComponent[totalComponents];
    for (int i = 0; i < totalComponents; i++) {
      components[i] = new GaussianComponent();
      components[i].read(stream);
    }
  }
}
java.langStringcopyValueOf

Javadoc

Returns a String that represents the character sequence in the array specified.

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
  • Top 12 Jupyter Notebook extensions
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