Google still has the old page cashed, so below is the origional contents of the textstring page for those that still need the Wstring information.
String (formerly TextString) Library
As of version 0.9, this library has been updated using the Wiring String library API. The Wiring library was based on version 0.1 of TextString and extended by Hernando Barragan. The download above contains additional examples and a version compatible with Arduino.
Version 0.9 is a bug fix. There was a memory leak, solved by Mikal Hart, and some length issues addressed by Andre Crone and Coen Blijker. This is an interim release.
A lot of programming work involves sending and receiving strings of ASCII data. Altough Arduino isn't designed as a platform for complex manipulation of text strings, there are often times when you need to read strings, look for substrings, compare strings, and so forth. You might be trying to read a GPS receiver, or sending commands to a Bluetooth or Zigbee radio that uses an AT-style command set. If that's what you're doing, this library is for you.
Download: String.zip http://arduino.cc/en/uploads/Tutorial/String.zip
To use, unzip it and copy the resulting folder, called String, into the libraries directory of your arduino sketch folder. If you don't already have a libraries folder, create it now.Then re-start the Arduino application.
When you restart, you'll see a few warning messages in the debugger pane at the bottom of the program. You can ignore them.
There is one significant difference between that version and this one: The Arduino String library contains the function getChars() instead of toCharArray(). The functionality of the two is identical. The name change was made for naming consistency.
This version has been tested with Arduino 0015.
Functions:
char charAt(int position) - Returns the character at position
void append(String thisString) - Appends the String representation of thisString. thisString can be and int, long, char, or char array
int capacity() - Returns the internal capacity of the String. This is different from the length.
boolean contains(String thisString) - Returns true if the string contains thisString
byte[] getBytes() - Returns an array of bytes of the String
char[] getChars() - Returns an array of chars of the String
void setCharAt(int positon, char thisChar) - sets the character specified at position to thisChar
boolean endsWith(String thisString) - Returns true if the current string ends with thisString
boolean equals(String thisString) - returns true if the string equals thisString
int indexOf(char thisChar) - Returns the position of the first occurrence of thisChar
int length() - Returns the number of characters in the string
void replace(char thisChar, char thatChar) - Replaces all the occurrences thsChar with thatChar
boolean startsWith(String thisString) - Returns true if the string starts with thisString
String substring(int beginning, int ending) - Returns a substring that begins at beginning position and ends at ending
void toLowerCase() - Converts all the characters to lower case
void toUpperCase() - Converts all the characters to upper case
If anyone's interested in helping to develop this library further, please contact me at tom.igoe at gmail.com
Share|