summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/text/StringBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/text/StringBuilder.cpp')
-rw-r--r--WebCore/platform/text/StringBuilder.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/WebCore/platform/text/StringBuilder.cpp b/WebCore/platform/text/StringBuilder.cpp
index c21e366..3e34981 100644
--- a/WebCore/platform/text/StringBuilder.cpp
+++ b/WebCore/platform/text/StringBuilder.cpp
@@ -95,4 +95,17 @@ String StringBuilder::toString() const
return result;
}
+void StringBuilder::clear()
+{
+ m_totalLength = UINT_MAX;
+ m_strings.clear();
+}
+
+unsigned StringBuilder::length() const
+{
+ if (m_totalLength == UINT_MAX)
+ return 0;
+ return m_totalLength;
+}
+
}