Java Utililty Methods String Clone

List of utility methods to do String Clone

Description

The list of methods to do String Clone are organized into topic(s).

Method

StringcloneString(final String toClone)
clone String
if (toClone == null) {
    return null;
if (toClone.isEmpty()) {
    return new String("").concat(new String(""));
if (toClone.length() == 1) {
    return String.valueOf(toClone.charAt(0));
...
StringcloneString(String input)
clone a String
return input;
StringcloneString(String sOriginal)
Echtes Klonen von Original.
if (sOriginal == null) {
    return null;
} else {
    return new String(sOriginal);
StringcloneString(String str)
clone String
if (str == null) {
    return null;
} else {
    return new String(str.getBytes().clone());