📄 javalang.doc4.html
字号:
Of the first 128 Unicode characters, exactly 26 are considered to be uppercase:<p>
<pre><a name="9244"></a>ABCDEFGHIJKLMNOPQRSTUVWXYZ
</pre><a name="23383"></a>
[This specification for the method <code>isUpperCase</code> is scheduled for introduction in Java version 1.1, either as defined here, or updated for Unicode 2.0; see <a href="javalang.doc4.html#14345">§20.5</a>. In previous versions of Java, this method returns <code>false</code> for all arguments larger than <code>\u00FF</code>.]<p>
<a name="9230"></a>
<p><font size=+1><strong>20.5.13 </strong> <code>public static boolean <code><b>isTitleCase</b></code>(char ch)</code></font>
<p>
<a name="9273"></a>
The result is <code>true</code> if and only if the character argument is a titlecase character.
<p><a name="9274"></a>
The notion of "titlecase" was introduced into Unicode to handle a peculiar situation: there are single Unicode characters whose appearance in each case looks exactly like two ordinary Latin letters. For example, there is a single Unicode character `LJ' (<code>\u01C7</code>) that looks just like the characters `L' and `J' put together. There is a corresponding lowercase letter `lj' (<code>\u01C9</code>) as well. These characters are present in Unicode primarily to allow one-to-one translations from the Cyrillic alphabet, as used in Serbia, for example, to the Latin alphabet. Now suppose the word "LJUBINJE" (which has <i>six</i> characters, not eight, because two of them are the single Unicode characters `LJ' and `NJ', perhaps produced by one-to-one translation from the Cyrillic) is to be written as part of a book title, in capitals and lowercase. The strategy of making the first letter uppercase and the rest lowercase results in "LJubinje"-most unfortunate. The solution is that there must be a third form, called a <i>titlecase</i> form. The titlecase form of `LJ' is `Lj' (<code>\u01C8</code>) and the titlecase form of `NJ' is `Nj'. A word for a book title is then best rendered by converting the first letter to titlecase if possible, otherwise to uppercase; the remaining letters are then converted to lowercase.<p>
<a name="9321"></a>
A character is considered to be titlecase if and only if both of the following are true:<p>
<ul><a name="9275"></a>
<li>The character <code>ch</code> is not in the range <code>\u2000</code> through <code>\u2FFF</code>.
<a name="9290"></a>
<li>The Unicode attribute table specifies a mapping to uppercase <i>and</i> a mapping to lowercase for this character.
</ul><a name="9301"></a>
There are exactly four Unicode 1.1.5 characters for which <code>isTitleCase</code> returns
<code>true</code>:
<p><pre><a name="9318"></a>
\u01C5    LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
<a name="9304"></a>\u01C8    LATIN CAPITAL LETTER L WITH SMALL LETTER J
<a name="9305"></a>\u01CB    LATIN CAPITAL LETTER N WITH SMALL LETTER J
<a name="9299"></a>\u01F2    LATIN CAPITAL LETTER D WITH SMALL LETTER Z
</pre><a name="23403"></a>
[This method is scheduled for introduction in Java version 1.1, either as defined here, or updated for Unicode 2.0; see <a href="javalang.doc4.html#14345">§20.5</a>.]<p>
<a name="13830"></a>
<p><font size=+1><strong>20.5.14 </strong> <code>public static boolean <code><b>isDigit</b></code>(char ch)</code></font>
<p>
<a name="9351"></a>
The result is <code>true</code> if and only if the character argument is a digit.
<p><a name="9352"></a>
A character is considered to be a digit if and only if both of the following are true:<p>
<ul><a name="9353"></a>
<li>The character <code>ch</code> is not in the range <code>\u2000</code> through <code>\u2FFF</code>.
<a name="9358"></a>
<li>The name for the character in the Unicode attribute table contains the word <code>DIGIT</code>.
</ul><a name="9359"></a>
The digits are those characters with the following codes:<p>
<pre><a name="31051"></a><code>0030</code>-<code>0039</code> ISO-Latin-1 (and ASCII) digits (<code>'</code>0<code>'</code>-<code>'</code>9<code>'</code>)
<a name="31052"></a><code>0660</code>-<code>0669</code> Arabic-Indic digits
<a name="31053"></a><code>06F0</code>-<code>06F9 </code>Eastern Arabic-Indic digits
<a name="9733"></a><code>0966</code>-<code>096F</code> Devanagari digits
<a name="9734"></a><code>09E6</code>-<code>09EF</code> Bengali digits
<a name="9735"></a><code>0A66</code>-<code>0A6F</code> Gurmukhi digits
<a name="9813"></a><code>0AE6</code>-<code>0AEF</code> Gujarati digits
<a name="9814"></a><code>0B66</code>-<code>0B6F</code> Oriya digits
<a name="9815"></a><code>0BE7</code>-<code>0BEF</code> Tamil digits (there are only nine of these-no zero digit)
<a name="9820"></a><code>0C66</code>-<code>0C6F</code> Telugu digits
<a name="9821"></a><code>0CE6</code>-<code>0CEF</code> Kannada digits
<a name="9822"></a><code>0D66</code>-<code>0D6F</code> Malayalam digits
<a name="9742"></a><code>0E50</code>-<code>0E59</code> Thai digits
<a name="9743"></a><code>0ED0</code>-<code>0ED9</code> Lao digits
<a name="9744"></a><code>FF10</code>-<code>FF19</code> Fullwidth digits
</pre><a name="9728"></a>
Of the first 128 Unicode characters, exactly 10 are considered to be digits:
<p><pre><a name="9361"></a>0123456789
</pre><a name="23387"></a>
[This specification for the method <code>isDigit</code> is scheduled for introduction in Java version 1.1, either as defined here, or updated for Unicode 2.0; see <a href="javalang.doc4.html#14345">§20.5</a>. In previous versions of Java, this method returns <code>false</code> for all arguments larger than <code>\u00FF</code>.]<p>
<a name="9163"></a>
<p><font size=+1><strong>20.5.15 </strong> <code>public static boolean <code><b>isLetter</b></code>(char ch)</code></font>
<p>
<a name="9669"></a>
The result is <code>true</code> if and only if the character argument is a letter.
<p><a name="9676"></a>
A character is considered to be a letter if and only if it is a letter or digit <a href="javalang.doc4.html#9501">(§20.5.16)</a> but is not a digit <a href="javalang.doc4.html#13830">(§20.5.14)</a>.<p>
<a name="23415"></a>
[This method is scheduled for introduction in Java version 1.1, either as defined here, or updated for Unicode 2.0; see <a href="javalang.doc4.html#14345">§20.5</a>.]<p>
<a name="9501"></a>
<p><font size=+1><strong>20.5.16 </strong> <code>public static boolean <code><b>isLetterOrDigit</b></code>(char ch)</code></font>
<p>
<a name="9607"></a>
The result is <code>true</code> if and only if the character argument is a letter-or-digit.
<p><a name="9612"></a>
A character is considered to be a letter-or-digit if and only if it is a defined Unicode character <a href="javalang.doc4.html#9149">(§20.5.10)</a> and its code lies in one of the following ranges:<p>
<pre><a name="9520"></a><code>0030</code>-<code>0039</code> ISO-Latin-1 (and ASCII) digits (<code>'0'</code>-<code>'9'</code>)
<a name="9521"></a><code>0041</code>-<code>005A</code> ISO-Latin-1 (and ASCII) uppercase Latin letters (<code>'A'-'Z'</code>)
<a name="9522"></a><code>0061</code>-<code>007A</code> ISO-Latin-1 (and ASCII) lowercase Latin letters (<code>'a'-'z'</code>)
<a name="9523"></a><code>00C0</code>-<code>00D6</code> ISO-Latin-1 supplementary letters
<a name="9524"></a><code>00D8</code>-<code>00F6</code> ISO-Latin-1 supplementary letters
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -