예제 #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;
}
예제 #2
0
파일: WireWriter.cpp 프로젝트: apaikan/yarp
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();
}