added const char* (cstring) support to writeString and improved erase method