summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts/unicode/string.h
diff options
context:
space:
mode:
authorAdam Chelminski <adam.chelminski@mongodb.com>2015-07-24 18:15:20 -0400
committerAdam Chelminski <adam.chelminski@mongodb.com>2015-08-07 17:12:21 -0400
commit5c053bde2267fadd42fdf71ceea047cbc1480d6d (patch)
tree4ed81b79cb60ef34769401c639caf5514f7735dc /src/mongo/db/fts/unicode/string.h
parent326aa0029a29f06772665750400473db69945234 (diff)
downloadmongo-5c053bde2267fadd42fdf71ceea047cbc1480d6d.tar.gz
SERVER-19639 Add Unicode phrase matcher and tokenizer for FTS
Diffstat (limited to 'src/mongo/db/fts/unicode/string.h')
-rw-r--r--src/mongo/db/fts/unicode/string.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/fts/unicode/string.h b/src/mongo/db/fts/unicode/string.h
index 1fa77af2f3f..ddfa6f93870 100644
--- a/src/mongo/db/fts/unicode/string.h
+++ b/src/mongo/db/fts/unicode/string.h
@@ -62,6 +62,11 @@ public:
explicit String(StringData utf8_src);
/**
+ * Reset the String with the new UTF-8 source data, reusing the underlying buffer when possible.
+ */
+ void resetData(const StringData utf8_src);
+
+ /**
* Return a lowercased version of the String instance using the Unicode data in u_data.h.
*/
String toLower(CaseFoldMode mode = CaseFoldMode::kNormal) const;
@@ -130,6 +135,11 @@ private:
String(std::u32string&& src);
/**
+ * Helper method for converting a UTF-8 string to a UTF-32 string.
+ */
+ void setData(const StringData utf8_src);
+
+ /**
* The underlying UTF-32 data.
*/
std::u32string _data;