Make WideString's FromUTF16LE(), FromUTF16BE() take bytes, not wchar_t

This allows callers to pass-in UTF-16 data that's possibly not
2-byte aligned, and seems to be what most of the callers want too.

With this, we'll be able to use this in PDF_DecodeText.

No intended behavior change.

Change-Id: I2095c49b98646a33b21342fe4289c0436f8447b9
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113950
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
diff --git a/testing/fx_string_testhelpers.cpp b/testing/fx_string_testhelpers.cpp
index 09f7653..399335c 100644
--- a/testing/fx_string_testhelpers.cpp
+++ b/testing/fx_string_testhelpers.cpp
@@ -10,6 +10,7 @@
 
 #include "core/fxcrt/cfx_datetime.h"
 #include "core/fxcrt/fx_string.h"
+#include "fpdfsdk/cpdfsdk_helpers.h"
 #include "third_party/base/check_op.h"
 #include "third_party/base/containers/span.h"
 
@@ -38,8 +39,7 @@
 }
 
 std::string GetPlatformString(FPDF_WIDESTRING wstr) {
-  WideString wide_string =
-      WideString::FromUTF16LE(wstr, WideString::WStringLength(wstr));
+  WideString wide_string = WideStringFromFPDFWideString(wstr);
   return std::string(wide_string.ToUTF8().c_str());
 }