summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/Shared/API/c/WKString.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/Shared/API/c/WKString.cpp')
-rw-r--r--Source/WebKit2/Shared/API/c/WKString.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebKit2/Shared/API/c/WKString.cpp b/Source/WebKit2/Shared/API/c/WKString.cpp
index 0c388c6..cbac67d 100644
--- a/Source/WebKit2/Shared/API/c/WKString.cpp
+++ b/Source/WebKit2/Shared/API/c/WKString.cpp
@@ -47,6 +47,17 @@ bool WKStringIsEmpty(WKStringRef stringRef)
return toImpl(stringRef)->isEmpty();
}
+size_t WKStringGetLength(WKStringRef stringRef)
+{
+ return toImpl(stringRef)->length();
+}
+
+size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
+{
+ COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
+ return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
+}
+
size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
{
return toImpl(stringRef)->maximumUTF8CStringSize();