MCPcopy Create free account
hub / github.com/davidgiven/luje / String

Class String

lib/java/lang/String.java:43–2048  ·  view source on GitHub ↗

An immutable sequence of characters/code units (chars). A String is represented by array of UTF-16 values, such that Unicode supplementary characters (code points) are stored/encoded as surrogate pairs via Unicode code units (char). @see StringBuffer @see StringBuilder @see

Source from the content-addressed store, hash-verified

41 * @since 1.0
42 */
43public final class String implements Serializable, Comparable<String>,
44 CharSequence {
45
46// private static final long serialVersionUID = -6849794470754667710L;
47//
48// /**
49// * An PrintStream used for System.out which performs the correct character
50// * conversion for the console, since the console may use a different
51// * conversion than the default file.encoding.
52// */
53// static class ConsolePrintStream extends java.io.PrintStream {
54// private static String charset;
55//
56// static {
57// charset = AccessController.doPrivileged(new PriviAction<String>(
58// "console.encoding", "ISO8859_1")); //$NON-NLS-1$ //$NON-NLS-2$
59// if (!Charset.isSupported(charset)) {
60// charset = "ISO-8859-1"; //$NON-NLS-1$
61// }
62// }
63//
64// /**
65// * Create a ConsolePrintStream on the specified OutputStream, usually
66// * System.out.
67// *
68// * @param out
69// * the console OutputStream
70// */
71// public ConsolePrintStream(java.io.OutputStream out) {
72// super(out, true);
73//
74// }
75//
76// /**
77// * Override the print(String) method from PrintStream to perform the
78// * character conversion using the console character converter.
79// *
80// * @param str
81// * the string to convert
82// */
83// @Override
84// public void print(String str) {
85// if (str == null) {
86// str = "null"; //$NON-NLS-1$
87// }
88//
89// try {
90// write(str.getBytes(charset));
91// } catch (java.io.IOException e) {
92// setError();
93// }
94// }
95// }
96
97 /**
98 * CaseInsensitiveComparator compares Strings ignoring the case of the
99 * characters.
100 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected