| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FXCRT_INCLUDE_FX_STRING_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_STRING_H_ |
| 8 #define CORE_FXCRT_INCLUDE_FX_STRING_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_STRING_H_ |
| 9 | 9 |
| 10 #include <stdint.h> // For intptr_t. | 10 #include <stdint.h> // For intptr_t. |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 : CFX_WideString(ptr, ptr ? FXSYS_wcslen(ptr) : 0) {} | 490 : CFX_WideString(ptr, ptr ? FXSYS_wcslen(ptr) : 0) {} |
| 491 | 491 |
| 492 CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len); | 492 CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len); |
| 493 CFX_WideString(FX_WCHAR ch); | 493 CFX_WideString(FX_WCHAR ch); |
| 494 | 494 |
| 495 CFX_WideString(const CFX_WideStringC& str); | 495 CFX_WideString(const CFX_WideStringC& str); |
| 496 CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2); | 496 CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2); |
| 497 | 497 |
| 498 ~CFX_WideString(); | 498 ~CFX_WideString(); |
| 499 | 499 |
| 500 static CFX_WideString FromLocal(const CFX_ByteString& str); | 500 static CFX_WideString FromLocal(const CFX_ByteStringC& str); |
| 501 static CFX_WideString FromCodePage(const CFX_ByteString& str, | 501 static CFX_WideString FromCodePage(const CFX_ByteStringC& str, |
| 502 uint16_t codepage); | 502 uint16_t codepage); |
| 503 | 503 |
| 504 static CFX_WideString FromUTF8(const CFX_ByteStringC& str); | 504 static CFX_WideString FromUTF8(const CFX_ByteStringC& str); |
| 505 static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len); | 505 static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len); |
| 506 | 506 |
| 507 static FX_STRSIZE WStringLength(const unsigned short* str); | 507 static FX_STRSIZE WStringLength(const unsigned short* str); |
| 508 | 508 |
| 509 // Explicit conversion to C-style wide string. | 509 // Explicit conversion to C-style wide string. |
| 510 // Note: |this| must outlive the use of the result. | 510 // Note: |this| must outlive the use of the result. |
| 511 const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } | 511 const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 } | 691 } |
| 692 | 692 |
| 693 FX_FLOAT FX_atof(const CFX_ByteStringC& str); | 693 FX_FLOAT FX_atof(const CFX_ByteStringC& str); |
| 694 inline FX_FLOAT FX_atof(const CFX_WideStringC& wsStr) { | 694 inline FX_FLOAT FX_atof(const CFX_WideStringC& wsStr) { |
| 695 return FX_atof(FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()).c_str()); | 695 return FX_atof(FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()).c_str()); |
| 696 } | 696 } |
| 697 void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData); | 697 void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData); |
| 698 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); | 698 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); |
| 699 | 699 |
| 700 #endif // CORE_FXCRT_INCLUDE_FX_STRING_H_ | 700 #endif // CORE_FXCRT_INCLUDE_FX_STRING_H_ |
| OLD | NEW |