7 * IoTString wraps the underlying char string.
8 * @author Brian Demsky <bdemsky@uci.edu>
12 public class IoTString {
18 * Builds an IoTString object around the char array. This
19 * constructor makes a copy, so the caller is free to modify the char array.
23 IoTString(Array<char> *_array) : array(new Array<char>(_array)) {}
27 * Internal method to grab a reference to our char array. Caller
31 Array<char> *internalBytes() { return array; }
34 * Returns a copy of the underlying char string.
37 Array<char> *getBytes() { return new Array<Char>(&array); }
40 * Returns the length in chars of the IoTString.
43 int length() { return array->length(); }
44 friend IoTString *IoTString_shallow(Array<char> *_array);
47 IoTString *IoTString_shallow(Array<char> *_array) {
48 IoTString *str = new IoTString();