From 275e260a6cd4a8e506ba974feb85ebcd926c1739 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 18 Sep 2017 14:23:18 -0400 Subject: Convert string class names Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- fpdfsdk/cpdfsdk_datetime.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'fpdfsdk/cpdfsdk_datetime.cpp') diff --git a/fpdfsdk/cpdfsdk_datetime.cpp b/fpdfsdk/cpdfsdk_datetime.cpp index d2653fca74..ce22cae12f 100644 --- a/fpdfsdk/cpdfsdk_datetime.cpp +++ b/fpdfsdk/cpdfsdk_datetime.cpp @@ -63,7 +63,7 @@ CPDFSDK_DateTime::CPDFSDK_DateTime() { ResetDateTime(); } -CPDFSDK_DateTime::CPDFSDK_DateTime(const CFX_ByteString& dtStr) { +CPDFSDK_DateTime::CPDFSDK_DateTime(const ByteString& dtStr) { ResetDateTime(); FromPDFDateTimeString(dtStr); } @@ -129,7 +129,7 @@ time_t CPDFSDK_DateTime::ToTime_t() const { } CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( - const CFX_ByteString& dtStr) { + const ByteString& dtStr) { int strLength = dtStr.GetLength(); if (strLength <= 0) return *this; @@ -263,34 +263,34 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( return *this; } -CFX_ByteString CPDFSDK_DateTime::ToCommonDateTimeString() { - CFX_ByteString str1; +ByteString CPDFSDK_DateTime::ToCommonDateTimeString() { + ByteString str1; str1.Format("%04d-%02u-%02u %02u:%02u:%02u ", m_year, m_month, m_day, m_hour, m_minute, m_second); if (m_tzHour < 0) str1 += "-"; else str1 += "+"; - CFX_ByteString str2; + ByteString str2; str2.Format("%02d:%02u", std::abs(static_cast(m_tzHour)), m_tzMinute); return str1 + str2; } -CFX_ByteString CPDFSDK_DateTime::ToPDFDateTimeString() { - CFX_ByteString dtStr; +ByteString CPDFSDK_DateTime::ToPDFDateTimeString() { + ByteString dtStr; char tempStr[32]; memset(tempStr, 0, sizeof(tempStr)); FXSYS_snprintf(tempStr, sizeof(tempStr) - 1, "D:%04d%02u%02u%02u%02u%02u", m_year, m_month, m_day, m_hour, m_minute, m_second); - dtStr = CFX_ByteString(tempStr); + dtStr = ByteString(tempStr); if (m_tzHour < 0) - dtStr += CFX_ByteString("-"); + dtStr += ByteString("-"); else - dtStr += CFX_ByteString("+"); + dtStr += ByteString("+"); memset(tempStr, 0, sizeof(tempStr)); FXSYS_snprintf(tempStr, sizeof(tempStr) - 1, "%02d'%02u'", std::abs(static_cast(m_tzHour)), m_tzMinute); - dtStr += CFX_ByteString(tempStr); + dtStr += ByteString(tempStr); return dtStr; } -- cgit v1.2.3