Commit Graph

23 Commits

Author SHA1 Message Date
David A. Mellis fb4e318ffa Starting to distinguish between empty strings and invalid (null) ones. 2011-03-18 21:45:27 -04:00
David A. Mellis 68f97155ec Moving move() to __GXX_EXPERIMENTAL_CXX0X__ only, adding operator bool(). 2011-03-13 16:46:06 -04:00
David A. Mellis 82fcee457c Modifying String.concat() to return success or failure, not this.
Which means you can't chain multiple concat() calls together, but you can check if they succeeded or not.
2011-03-12 14:03:34 -05:00
David A. Mellis cc3671e0c8 Don't return the string when modifying its value.
Changing toLowerCase(), toUpperCase(), trim() and replace() to return void instead of a reference to the string that's just been changed.  That way, it's clear that the functions modify the string they've been called on.
2011-03-11 18:54:58 -05:00
David A. Mellis 5c29add087 Renaming append() back to concat(). 2011-03-11 18:04:31 -05:00
David A. Mellis 5797e9bbbe Removing F("string") syntax for now.
We should probably add something like this back in later, but I want to do one thing at a time.  This removes the __FlashStringHelper class as well.
2011-03-11 18:01:40 -05:00
David A. Mellis 3b952ba168 Rewrite of the String class by Paul Stoffregen.
http://www.pjrc.com/teensy/string_class_experimental.html
2011-03-11 17:56:10 -05:00
David A. Mellis f2af8883a7 Renamed WProgram.h to Arduino.h. 2011-03-01 19:52:13 -05:00
David A. Mellis 663a17f491 Changing String append to use realloc(); thanks to Paul Stoffregen.
http://code.google.com/p/arduino/issues/detail?id=332
2010-12-11 15:22:07 -05:00
David A. Mellis 529ceb6d3b Replacing custom String.toInt() function with a call to atol(). 2010-12-03 23:12:41 -05:00
David A. Mellis d656974cee Redoing 448222e4b65e0cf44dfc0c494f7f76901f1fabea without all the extra files.
Adds toInt() to String, WCharacter.h (from Wiring), and an SD Datalogger example.
2010-11-29 15:20:30 -05:00
David A. Mellis 393ca89a01 Revert "added toInt() function to WString".
This reverts commit 448222e4b65e0cf44dfc0c494f7f76901f1fabea.
2010-11-29 15:14:10 -05:00
Tom Igoe 711f4f95a0 added toInt() function to WString 2010-11-29 11:31:00 -05:00
David A. Mellis 3616c3aac6 Changing String::toCharArray() and getBytes() to accept a buffer, rather than return one. That way they don't expose the internal representation of the String class, allowing future optimization. Thanks to Paul Stoffregen. 2010-08-28 10:23:54 +00:00
David A. Mellis 2171e0d9f2 Returning a reference to a dummy character for indices beyond the string length (in operator[]). 2010-08-28 09:55:26 +00:00
David A. Mellis b616c157ae Adding some basic error checking to the String class (i.e. checking for a non-null buffer before modifying its contents). 2010-08-18 21:39:28 +00:00
David A. Mellis 7d91fb31c2 Reverting changes to String class and modifying to allow + and += to work on more types. 2010-07-27 14:20:56 +00:00
Tom Igoe 8a48e1bc5e removed append() from String library 2010-07-27 10:18:04 +00:00
Tom Igoe e8a2b8421d checked in Xiaoyang Feng's changes to String library 2010-07-27 10:09:09 +00:00
Tom Igoe 71c85dba5e Checked in Xiaoyang's changes to String library 2010-07-27 10:06:43 +00:00
David A. Mellis 270a459232 whitespace. 2010-07-05 16:08:35 +00:00
David A. Mellis 09315f91a9 Modifying String from new/delete to malloc()/free(). Also #include'ing WString.h from WProgram.h. 2010-07-04 16:36:52 +00:00
David A. Mellis 1d2fc4fb33 Adding WString.h and WString.cpp straight from Wiring (r. 726). Won't actually work yet. 2010-07-04 16:27:23 +00:00