예제 #1
0
String MarkupAccumulator::serializeNodes(Node* node, Node* nodeToSkip, EChildrenOnly childrenOnly)
{
    StringBuilder out;
    serializeNodesWithNamespaces(node, nodeToSkip, childrenOnly, 0);
    out.reserveCapacity(length());
    concatenateMarkup(out);
    return out.toString();
}
예제 #2
0
파일: markup.cpp 프로젝트: domenic/mojo
String StyledMarkupAccumulator::takeResults()
{
    StringBuilder result;
    result.reserveCapacity(totalLength(m_reversedPrecedingMarkup) + length());

    for (size_t i = m_reversedPrecedingMarkup.size(); i > 0; --i)
        result.append(m_reversedPrecedingMarkup[i - 1]);

    concatenateMarkup(result);

    // We remove '\0' characters because they are not visibly rendered to the user.
    return result.toString().replace(0, "");
}