diff --git a/Language/Variables/Data Types/string.adoc b/Language/Variables/Data Types/string.adoc index 9273f9c9e..c19ab743e 100644 --- a/Language/Variables/Data Types/string.adoc +++ b/Language/Variables/Data Types/string.adoc @@ -37,7 +37,7 @@ All of the following are valid declarations for strings. *Null termination* -Generally, strings are terminated with a null character (ASCII code 0). This allows functions (like `Serial.print()`) to tell where the end of a string is. Otherwise, they would continue reading subsequent bytes of memory that aren't actually part of the string. +Generally, strings are terminated with a null character (ASCII code 0). This allows functions (like `link:../../../functions/communication/serial/print[Serial.print()]`) to tell where the end of a string is. Otherwise, they would continue reading subsequent bytes of memory that aren't actually part of the string. This means that your string needs to have space for one more character than the text you want it to contain. That is why Str2 and Str5 need to be eight characters, even though "arduino" is only seven - the last position is automatically filled with a null character. Str4 will be automatically sized to eight characters, one for the extra null. In Str3, we've explicitly included the null character (written '\0') ourselves. @@ -62,7 +62,7 @@ char myString[] = "This is the first line" It is often convenient, when working with large amounts of text, such as a project with an LCD display, to setup an array of strings. Because strings themselves are arrays, this is actually an example of a two-dimensional array. -In the code below, the asterisk after the datatype `char` "`char*`" indicates that this is an array of "`pointers`". All array names are actually pointers, so this is required to make an array of arrays. Pointers are one of the more esoteric parts of C++ for beginners to understand, but it isn't necessary to understand pointers in detail to use them effectively here. +In the code below, the asterisk after the datatype `link:../char[char]` "`char*`" indicates that this is an array of "`pointers`". All array names are actually pointers, so this is required to make an array of arrays. Pointers are one of the more esoteric parts of C++ for beginners to understand, but it isn't necessary to understand pointers in detail to use them effectively here. -- // OVERVIEW SECTION ENDS