Go Down

Topic: Correction/clarification needed to String and string documentation (Read 155 times) previous topic - next topic

TrashCompactor

The documentation for the String on this page
https://www.arduino.cc/en/Reference/StringObject
says: "Note that constant strings, specified in "double quotes" are treated as char arrays, not instances of the String class."

but the documentation on this string page (note string is not capitalized)
https://www.arduino.cc/en/Reference/String
says:"Strings are always defined inside double quotes ("Abc") and characters are always defined inside single quotes('A')."

How can a String always be defined with double quotes but constant strings in double quotes are treated as char arrays?

pert

"Strings are always defined inside double quotes ("Abc") and characters are always defined inside single quotes('A')."

How can a String always be defined with double quotes but constant strings in double quotes are treated as char arrays?
They actually meant "strings are always defined inside double quotes ("Abc") and characters are always defined inside single quotes('A')." but they capitalized string in that sentence because it was the first word in the sentence, not because they were referring to a String. A string is a character array.

TrashCompactor

I think that is an important capitalization error because of the understood meaning behind the capitalized "S".  Can this be updated or clarified in the documentation?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy