Skip to content

Commit e4aefd6

Browse files
committed
Fixed #258 by correcting typos, slight rephrasing, and formatting corrections
1 parent c7df2b5 commit e4aefd6

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

content/api_en/include/String.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ println(quoted); // This one has "quotes"
4444
</example>
4545

4646
<description><![CDATA[
47-
A string is a sequence of characters. The class <b>String</b> includes methods for examining individual characters, comparing strings, searching strings, extracting parts of strings, and for converting an entire string uppercase and lowercase. Strings are always defined inside double quotes ("Abc"), and characters are always defined inside single quotes ('A').<br/>
47+
A string is a sequence of characters. The class <b>String</b> includes methods for examining individual characters, comparing strings, searching strings, extracting parts of strings, and for converting an entire string uppercase and lowercase. Strings are always defined inside double quotes (<b>"Abc"</b>), and characters are always defined inside single quotes (<b>'A'</b>).<br/>
4848
<br/>
49-
To compare the contents of two Strings, use the <b>equals()</b> method, as in "if (a.equals(b))", instead of "if (a == b)". A String is an Object, so comparing them with the == operator only compares whether both Strings are stored in the same memory location. Using the <b>equals()</b> method will ensure that the actual contents are compared. (The <a href="http://wiki.processing.org/w/Troubleshooting#Why_don.27t_these_Strings_equal.3F">troubleshooting</a> reference has a longer explanation.)<br />
49+
To compare the contents of two Strings, use the <b>equals()</b> method, as in <b>if (a.equals(b))</b>, instead of <b>if (a == b)</b>. A String is an Object, so comparing them with the <b>==</b> operator only compares whether both Strings are stored in the same memory location. Using the <b>equals()</b> method will ensure that the actual contents are compared. (The <a href="http://wiki.processing.org/w/Troubleshooting#Why_don.27t_these_Strings_equal.3F">troubleshooting</a> reference has a longer explanation.)<br />
5050
<br />
51-
Because a String is defined between quotation marks, to include such marks within the String itself you must use the &#92; (backslash) character. (See the third example above.) This is known as an <em>escape sequence</em>. Other escape sequences include &#92;t for the tab character and &#92;n for new line. Because backslash is the escape character, to include a single backslash within a String, you must use two consecutive backslashes, as in: &#92;&#92;<br/>
51+
Because a String is defined between double quotation marks, to include such marks within the String itself you must use the <b>&#92;</b> (backslash) character. (See the third example above.) This is known as an <em>escape sequence</em>. Other escape sequences include <b>&#92;t</b> for the tab character and <b>&#92;n</b> for new line. Because backslash is the escape character, to include a single backslash within a String, you must use two consecutive backslashes, as in: <b>&#92;&#92;</b><br/>
5252
<br/>
53-
There are more string methods than those linked from this page. Additional documentation is located online in the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html">official Java documentation.</a>.
53+
There are more string methods than those linked from this page. Additional documentation is located online in the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html">official Java documentation</a>.
5454
]]></description>
5555

5656
<syntax></syntax>
@@ -67,7 +67,7 @@ There are more string methods than those linked from this page. Additional docum
6767

6868
<method>
6969
<mname>indexOf()</mname>
70-
<mdescription>Returns the index value of the first occurance of a character within the input string</mdescription>
70+
<mdescription>Returns the index value of the first occurrence of a substring within the input string</mdescription>
7171
</method>
7272

7373
<method>

content/api_en/include/String_indexOf.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ println(p1 + ":" + p2 + ":" + p3); // Prints "0:3:2"
2121
</example>
2222

2323
<description><![CDATA[
24-
Tests to see if a substring is embedded in a string and returns the index position of the first occurance of the substring defined in the <b>str</b> parameter. If the <b>str</b> parameter is not found in the string, -1 is returned.
24+
Tests to see if a substring is embedded in a String, and returns the index position of the first occurrence of the substring defined in the <b>str</b> parameter. If the <b>str</b> substring is not found within the String, <b>-1</b> is returned.
2525
]]></description>
2626

2727
<syntax>

0 commit comments

Comments
 (0)