Lines Matching defs:string

29      * empty string
33 /** {@code non-null;} the UTF-8 value as a string */
34 private final String string;
40 * Converts a string into its MUTF-8 form. MUTF-8 differs from normal UTF-8
43 * @param string {@code non-null;} the string to convert
46 public static byte[] stringToUtf8Bytes(String string) {
47 int len = string.length();
52 char c = string.charAt(i);
74 * Converts an array of UTF-8 bytes into a string.
77 * @return {@code non-null;} the converted string
178 * @param string {@code non-null;} the UTF-8 value as a string
180 public CstString(String string) {
181 if (string == null) {
182 throw new NullPointerException("string == null");
185 this.string = string.intern();
186 this.bytes = new ByteArray(stringToUtf8Bytes(string));
200 this.string = utf8BytesToString(bytes).intern();
210 return string.equals(((CstString) other).string);
216 return string.hashCode();
222 return string.compareTo(((CstString) other).string);
228 return "string{\"" + toHuman() + "\"}";
245 int len = string.length();
249 char c = string.charAt(i);
268 (i < (len - 1)) ? string.charAt(i + 1) : 0;
299 * Gets the value as a human-oriented string, surrounded by double
302 * @return {@code non-null;} the quoted string
309 * Gets the value as a human-oriented string, surrounded by double
313 * @param maxLength {@code >= 5;} the maximum length of the string to return
314 * @return {@code non-null;} the quoted string
317 String string = toHuman();
318 int length = string.length();
324 string = string.substring(0, maxLength - 5);
328 return '\"' + string + ellipses + '\"';
332 * Gets the UTF-8 value as a string.
333 * The returned string is always already interned.
335 * @return {@code non-null;} the UTF-8 value as a string
338 return string;
369 return string.length();