summaryrefslogtreecommitdiff
path: root/include/rtl
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@collabora.com>2014-02-17 16:12:57 +0530
committerMuthu Subramanian <sumuthu@collabora.com>2014-02-17 19:17:20 +0530
commit4cf0d8edaf1581c42949ad2cbb40183a2f657ddd (patch)
tree497eac4fbeef1d9cd96627a528813d1a636109f1 /include/rtl
parentd5995b3f6713839e0f03774664ea4bd9664e6323 (diff)
String cleanups.
Change-Id: Ibebf394d69ed4845d91176727f291187ba35ed34
Diffstat (limited to 'include/rtl')
-rw-r--r--include/rtl/string.hxx2
-rw-r--r--include/rtl/ustring.hxx15
2 files changed, 17 insertions, 0 deletions
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 24bb98052e40..5eb4fcf6ee1e 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -898,6 +898,8 @@ public:
@return a hash code value of the string data
@see hashCode() for simple hashes
+
+ @since LibreOffice 4.3
*/
sal_uInt64 hashCode64() const SAL_THROW(())
{
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index f1a5f4aeb296..9f9a9565f18f 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -1227,6 +1227,21 @@ public:
}
/**
+ Returns a 64bit hash of the string data.
+ This hashes the entire data, while hashCode would do sampling for larger string sizes.
+
+ @return a hash code value of the string data
+
+ @see hashCode() for simple hashes
+
+ @since LibreOffice 4.3
+ */
+ sal_uInt64 hashCode64() const SAL_THROW(())
+ {
+ return rtl_ustr_hashCode64_WithLength( pData->buffer, pData->length );
+ }
+
+ /**
Returns a hashcode for this string.
@return a hash code value for this object.