summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/PublicMethods.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-12 16:46:34 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-12 16:46:34 -0700
commit745611b68cdfcbfb50d792694ed2dc7be9f4f936 (patch)
tree5c848f1d3cd53dcd5ee8fb35707b7320e85cb28c /fpdfsdk/javascript/PublicMethods.h
parent461129efe889fa7d653c8c4620a12179eeddd5ec (diff)
downloadpdfium-745611b68cdfcbfb50d792694ed2dc7be9f4f936.tar.xz
Make CJS_PublicMethods::StrTrim() take a CFX_ByteString
Similar to https://codereview.chromium.org/1876203002 but in a different file. The result is still not as efficient as possible owing to the conversions back and forth to C types. Convert these methods to ordinary functions in anon namespace while we're at it. Review URL: https://codereview.chromium.org/1882173002
Diffstat (limited to 'fpdfsdk/javascript/PublicMethods.h')
-rw-r--r--fpdfsdk/javascript/PublicMethods.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.h b/fpdfsdk/javascript/PublicMethods.h
index 16cc5bc21a..67ca082f31 100644
--- a/fpdfsdk/javascript/PublicMethods.h
+++ b/fpdfsdk/javascript/PublicMethods.h
@@ -146,17 +146,9 @@ class CJS_PublicMethods : public CJS_Object {
const CFX_WideString& format);
static double ParseNormalDate(const CFX_WideString& value,
bool* bWrongFormat);
- static double MakeInterDate(CFX_WideString strValue);
+ static double MakeInterDate(const CFX_WideString& value);
- static CFX_WideString StrLTrim(const FX_WCHAR* pStr);
- static CFX_WideString StrRTrim(const FX_WCHAR* pStr);
- static CFX_WideString StrTrim(const FX_WCHAR* pStr);
-
- static CFX_ByteString StrLTrim(const FX_CHAR* pStr);
- static CFX_ByteString StrRTrim(const FX_CHAR* pStr);
- static CFX_ByteString StrTrim(const FX_CHAR* pStr);
-
- static bool IsNumber(const FX_WCHAR* string);
+ static bool IsNumber(const CFX_WideString& str);
static bool maskSatisfied(wchar_t c_Change, wchar_t c_Mask);
static bool isReservedMaskChar(wchar_t ch);