Example #1
0
static yarp::os::ConstString quoteFree(const yarp::os::ConstString &src) {
    yarp::os::ConstString result = "";
    for (unsigned int i=0; i<src.length(); i++) {
        char ch = src[i];
        if (ch=='"') {
            result += "&quot;";
        } else {
            result += ch;
        }
    }
    return result;
}
Example #2
0
bool WireWriter::writeBinary(const yarp::os::ConstString& tag) {
    writer.appendInt(BOTTLE_TAG_BLOB);
    writer.appendInt((int)tag.length());
    writer.appendBlock(tag.c_str(),tag.length());
    return !writer.isError();
}