Create a string that is the same length as the input, but filled with
characters.

@param value
@return String
324577
static public String blockContents(byte[] value) {
        if (null == value) {
            return null;
        }
        char[] data = new char[value.length];
        for (int i = 0; i < data.length; i++) {
            data[i] = '*';
        }
        return new String(data);
    }
102280
@Override
    public String tagValue(String value) {
        String formattedValue = StringEscapeUtils.escapeJson(delegate.tagValue(value));
        return StringUtils.truncate(formattedValue, TAG_VALUE_MAX_LENGTH);
    }
497402
public String convert(final String value) {

        if(!value.matches(".*[0-9].*")) {
            return value;
        }

        String str = value;
        for(int i=0; i < numMap.length; i++) {
            str = str.replaceAll(String.valueOf(i), numMap[i]);
        }

        return str;

    }
124777
public static String javaQuotedLiteral(String value)
    {
        StringBuilder b = new StringBuilder(value.length() * 2);
        b.append('"');
        for (int i = 0; i < value.length(); i++) {
            char c = value.charAt(i);
            switch (c) {
                case '"': b.append("\\\""); break;
                case '\\': b.append("\\\\"); break;
                case '\n': b.append("\\n"); break;
                case '\r': b.append("\\t"); break;
                case '\t': b.append("\\r"); break;
                case '\0': b.append("\\000"); break;  // Inserting '\0' isn't safe if there's a digit after
                default:
                    if (c >= 0x20 && c <= 0x7e) {
                        b.append(c);
                    } else {
                        int h1 = (c >> 12) & 0xf;
                        int h2 = (c >> 8) & 0xf;
                        int h3 = (c >> 4) & 0xf;
                        int h4 = c & 0xf;
                        b.append("\\u");
                        b.append(hexDigit(h1));
                        b.append(hexDigit(h2));
                        b.append(hexDigit(h3));
                        b.append(hexDigit(h4));
                    }
                    break;
            }
        }
        b.append('"');
        return b.toString();
    }
1031088
public static String encode(String value) {
        if (value == null) {
            return value;
        }
        try {
            value = URLEncoder.encode(value, Constants.UTF_8);
        } catch (UnsupportedEncodingException e) {
            // Do nothing - UTF-8 should always be supported
        }
        return value;
    }
526637
public IsEmptyBuilder append(final char value) {
        if(isNotEmpty()) {
            return this;
        }

        final String str = (value == '\u0000' ? "" : String.valueOf(value));
        return append(str);
    }
1097758
public static String escape(String value) {
        for (int i = 0; i < value.length(); i++) {
            if (isEscapingChar(value.charAt(i))) {
                return doEscape(value.getBytes(StandardCharsets.UTF_8), i);
            }
        }
        return value;
    }
1090012
public static String stripDelimiters(final String value) {
        if (value != null && value.length() > 1) {
            if (value.charAt(0) == value.charAt(value.length() - 1)
                    && (value.charAt(0) == '\'')) {
                return value.substring(1, value.length() - 1);
            }
            if (value.charAt(0) == value.charAt(value.length() - 1)
                    && (value.charAt(0) == '\"')) {
                return value.substring(1, value.length() - 1);
            }
        }
        return value;
    }
912352
public static Expression constant(final String value) {
    checkNotNull(value);
    checkArgument(
        Utf8.encodedLength(value) <= MAX_CONSTANT_STRING_LENGTH,
        "String is too long when encoded in utf8");
    return stringConstant(value);
  }
752298
public JsonWriter valueUnescaped(CharSequence value) {
        startValue();

        if (value == null) {
            writer.write(kNull);
        } else {
            writer.write('\"');
            writer.write(value.toString());
            writer.write('\"');
        }
        return this;
    }
425283
private String convertSimpleArrayToString(Object value) {
        String answer;
        int length = Array.getLength(value);
        StringBuffer temp = new StringBuffer("{");
        for (int i = 0; i < length && i < MAX_ARRAY_LENGTH; i++) {
            Object element = Array.get(value, i);
            if ((i > 0) && !(element instanceof Character))
                temp.append(",");
            temp.append(element);
        }
        if (length > MAX_ARRAY_LENGTH) {
            if (!(Array.get(value, 0) instanceof Character))
                temp.append(",");
            temp.append("...");
        }
        temp.append("} /* array length = ");
        temp.append(Integer.toString(Array.getLength(value)));
        temp.append(" */");
        answer = temp.toString();
        return answer;
    }
673538
private static String escapeAttributeValue(String value) {
        final String escapees = ",=+<>#;\"\\";
        char[] chars = value.toCharArray();
        StringBuffer buf = new StringBuffer(2 * value.length());

        // Find leading and trailing whitespace.
        int lead; // index of first char that is not leading whitespace
        for (lead = 0; lead < chars.length; lead++) {
            if (!isWhitespace(chars[lead])) {
                break;
            }
        }
        int trail; // index of last char that is not trailing whitespace
        for (trail = chars.length - 1; trail >= 0; trail--) {
            if (!isWhitespace(chars[trail])) {
                break;
            }
        }

        for (int i = 0; i < chars.length; i++) {
            char c = chars[i];
            if ((i < lead) || (i > trail) || (escapees.indexOf(c) >= 0)) {
                buf.append('\\');
            }
            buf.append(c);
        }
        return new String(buf);
    }
977530
public static String toUnderline(String value) {
        StringBuilder result = new StringBuilder();
        if (value != null && value.length() > 0) {
            result.append(value.substring(0, 1).toLowerCase());
            for (int i = 1; i < value.length(); i++) {
                String s = value.substring(i, i + 1);
                if (s.equals(s.toUpperCase())) {
                    result.append("_");
                    result.append(s.toLowerCase());
                } else {
                    result.append(s);
                }
            }
        }
        return result.toString();
    }
36314
public String encode(String value) {
    if (value == null) { return null; }
    StringBuilder buffer = new StringBuilder();
    buffer.append(Prefix);
    buffer.append(charset);
    buffer.append(Sep);
    buffer.append(getEncoding());
    buffer.append(Sep);
    buffer.append(new String(Base64.encode(value.getBytes(charset))));
    buffer.append(Postfix);
    return buffer.toString();
  }
719024
public static String getDigits(String value) {

    StringBuilder digits = new StringBuilder(value.length());

    for (char chr : value.toCharArray()) {
      if (Character.isDigit(chr)) {
        digits.append(chr);
      }
    }

    return digits.toString();
  }
554663
private function intToMaxLengthHex($value, $length)
    {
        return str_pad(substr(dechex($value), 0, $length), $length, '0', STR_PAD_LEFT);
    }
406192
public String format(String value) {
        StringBuilder s = new StringBuilder();

        if (value != null && value.trim().length() > 0) {
            boolean continuationLine = false;

            s.append(getName()).append(":");
            if (isFirstLineEmpty()) {
                s.append("\n");
                continuationLine = true;
            }

            try {
                BufferedReader reader = new BufferedReader(new StringReader(value));
                String line;
                while ((line = reader.readLine()) != null) {
                    if (continuationLine && line.trim().length() == 0) {
                        // put a dot on the empty continuation lines
                        s.append(" .\n");
                    } else {
                        s.append(" ").append(line).append("\n");
                    }

                    continuationLine = true;
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        return s.toString();
    }