Rename WideString::{UTF8,UTF16LE}_Encode() to To{UTF8,UTF16LE}().
Make consistent with ToDefANSI().
Change-Id: I576f5a8a2bb3f633c7dca67efd7712fa610acf4d
Reviewed-on: https://pdfium-review.googlesource.com/c/45791
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxcrt/widestring.cpp b/core/fxcrt/widestring.cpp
index 55bb83b..234270e 100644
--- a/core/fxcrt/widestring.cpp
+++ b/core/fxcrt/widestring.cpp
@@ -654,11 +654,11 @@
return bstr;
}
-ByteString WideString::UTF8Encode() const {
+ByteString WideString::ToUTF8() const {
return FX_UTF8Encode(AsStringView());
}
-ByteString WideString::UTF16LE_Encode() const {
+ByteString WideString::ToUTF16LE() const {
if (!m_pData)
return ByteString("\0\0", 2);
@@ -1033,7 +1033,7 @@
}
std::ostream& operator<<(std::ostream& os, const WideString& str) {
- os << str.UTF8Encode();
+ os << str.ToUTF8();
return os;
}