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_INCLUDE_FXCRT_FX_STRING_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_STRING_H_ |
8 #define CORE_INCLUDE_FXCRT_FX_STRING_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_STRING_H_ |
9 | 9 |
10 #include <stdint.h> // For intptr_t. | 10 #include <stdint.h> // For intptr_t. |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 | 562 |
563 CFX_WideString(const CFX_WideStringC& str); | 563 CFX_WideString(const CFX_WideStringC& str); |
564 | 564 |
565 CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2); | 565 CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2); |
566 | 566 |
567 ~CFX_WideString(); | 567 ~CFX_WideString(); |
568 | 568 |
569 static CFX_WideString FromLocal(const CFX_ByteString& str); | 569 static CFX_WideString FromLocal(const CFX_ByteString& str); |
570 | 570 |
571 static CFX_WideString FromCodePage(const CFX_ByteString& str, | 571 static CFX_WideString FromCodePage(const CFX_ByteString& str, |
572 FX_WORD codepage); | 572 uint16_t codepage); |
573 | 573 |
574 static CFX_WideString FromUTF8(const char* str, FX_STRSIZE len); | 574 static CFX_WideString FromUTF8(const char* str, FX_STRSIZE len); |
575 | 575 |
576 static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len); | 576 static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len); |
577 | 577 |
578 static FX_STRSIZE WStringLength(const unsigned short* str); | 578 static FX_STRSIZE WStringLength(const unsigned short* str); |
579 | 579 |
580 // Explicit conversion to C-style wide string. | 580 // Explicit conversion to C-style wide string. |
581 const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } | 581 const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } |
582 | 582 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 } | 810 } |
811 | 811 |
812 FX_FLOAT FX_atof(const CFX_ByteStringC& str); | 812 FX_FLOAT FX_atof(const CFX_ByteStringC& str); |
813 inline FX_FLOAT FX_atof(const CFX_WideStringC& wsStr) { | 813 inline FX_FLOAT FX_atof(const CFX_WideStringC& wsStr) { |
814 return FX_atof(FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength())); | 814 return FX_atof(FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength())); |
815 } | 815 } |
816 void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData); | 816 void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData); |
817 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); | 817 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); |
818 | 818 |
819 #endif // CORE_INCLUDE_FXCRT_FX_STRING_H_ | 819 #endif // CORE_INCLUDE_FXCRT_FX_STRING_H_ |
OLD | NEW |