0
\$\begingroup\$

It seems that several of the String methods (so far I'm sure it applies to trim() and the to upper/lower functions) in the Arduino library have been modified to alter the String rather than return a new one. Is there a complete list of which methods have been modified? The release notes have the following unhelpful statement:

  • The String class has been reimplemented as well, by Paul Stoffregen. This new version is more memory-efficient and robust. Some functions which previously returned new string instances (e.g. trim() and toUpperCase()) have been changed to instead modify strings in place.

Thanks!

\$\endgroup\$
  • \$\begingroup\$ Nothing to do with electronic design. Question should be closed. \$\endgroup\$ – Leon Heller Apr 23 '12 at 5:35
1
\$\begingroup\$

I would suggest looking trough the source code of WString.cpp of the current version... That way you'll get up to date informations from the first hand...

\$\endgroup\$
1
\$\begingroup\$

At least in the MAC OSX and Windows version, there is no documentation in the reference folder for the String class. That certainly can lead to confusion about the new String class when you receive no documentation in the distribution.

However the files are posted in the reference section on-line. I expect your questions may well be answered there if you do no care to delve into the source code, (although the source is the ultimate resource.)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.