| 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 _FX_STRING_H_ | 7 #ifndef _FX_STRING_H_ |
| 8 #define _FX_STRING_H_ | 8 #define _FX_STRING_H_ |
| 9 class CFX_ByteStringC; | 9 class CFX_ByteStringC; |
| 10 class CFX_ByteString; | 10 class CFX_ByteString; |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 | 590 |
| 591 FX_STRSIZE m_Length; | 591 FX_STRSIZE m_Length; |
| 592 private: | 592 private: |
| 593 | 593 |
| 594 void* operator new (size_t) throw() | 594 void* operator new (size_t) throw() |
| 595 { | 595 { |
| 596 return NULL; | 596 return NULL; |
| 597 } | 597 } |
| 598 }; | 598 }; |
| 599 typedef const CFX_WideStringC& FX_WSTR; | 599 typedef const CFX_WideStringC& FX_WSTR; |
| 600 #define FX_WSTRC(wstr) CFX_WideStringC(wstr, sizeof(wstr) / sizeof(FX_WCHAR) - 1
) | 600 #define FX_WSTRC(wstr) CFX_WideStringC(wstr, FX_ArraySize(wstr) - 1) |
| 601 struct CFX_StringDataW { | 601 struct CFX_StringDataW { |
| 602 | 602 |
| 603 long m_nRefs; | 603 long m_nRefs; |
| 604 | 604 |
| 605 FX_STRSIZE m_nDataLength; | 605 FX_STRSIZE m_nDataLength; |
| 606 | 606 |
| 607 FX_STRSIZE m_nAllocLength; | 607 FX_STRSIZE m_nAllocLength; |
| 608 | 608 |
| 609 FX_WCHAR m_String[1]; | 609 FX_WCHAR m_String[1]; |
| 610 }; | 610 }; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); | 844 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); |
| 845 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) | 845 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) |
| 846 { | 846 { |
| 847 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); | 847 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); |
| 848 } | 848 } |
| 849 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) | 849 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) |
| 850 { | 850 { |
| 851 return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); | 851 return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); |
| 852 } | 852 } |
| 853 #endif | 853 #endif |
| OLD | NEW |