| 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; |
| 11 class CFX_WideStringC; | 11 class CFX_WideStringC; |
| 12 class CFX_WideString; | 12 class CFX_WideString; |
| 13 struct CFX_CharMap; | 13 struct CFX_CharMap; |
| 14 class CFX_BinaryBuf; | 14 class CFX_BinaryBuf; |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_LPSTR buf); | 834 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_LPSTR buf); |
| 835 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); | 835 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); |
| 836 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) | 836 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) |
| 837 { | 837 { |
| 838 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); | 838 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); |
| 839 } | 839 } |
| 840 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) | 840 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) |
| 841 { | 841 { |
| 842 return FX_UTF8Encode((FX_LPCWSTR)wsStr, wsStr.GetLength()); | 842 return FX_UTF8Encode((FX_LPCWSTR)wsStr, wsStr.GetLength()); |
| 843 } | 843 } |
| 844 class CFX_ByteStringL : public CFX_ByteStringC | |
| 845 { | |
| 846 public: | |
| 847 CFX_ByteStringL() : CFX_ByteStringC() {} | |
| 848 ~CFX_ByteStringL() {} | |
| 849 | |
| 850 void Empty(IFX_Allocator* pAllocator); | |
| 851 FX_LPSTR AllocBuffer(FX_STRSIZE length, IFX_Allocator* pAllocator); | |
| 852 | |
| 853 void Set(FX_BSTR src, IFX_Allocator* pAllocator); | |
| 854 }; | |
| 855 class CFX_WideStringL : public CFX_WideStringC | |
| 856 { | |
| 857 public: | |
| 858 CFX_WideStringL() : CFX_WideStringC() {} | |
| 859 ~CFX_WideStringL() {} | |
| 860 | |
| 861 void Empty(IFX_Allocator* pAllocator); | |
| 862 void Set(FX_WSTR src, IFX_Allocator* pAllocator); | |
| 863 | |
| 864 int GetInteger() const; | |
| 865 FX_FLOAT GetFloat() const; | |
| 866 | |
| 867 void TrimRight(FX_LPCWSTR lpszTargets); | |
| 868 }; | |
| 869 void FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len, CFX_ByteStringL &utf8St
r, IFX_Allocator* pAllocator = NULL); | |
| 870 #endif | 844 #endif |
| OLD | NEW |