| 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 FX_STRSIZE Find(FX_LPCWSTR lpszSub, FX_STRSIZE star
t = 0) const; | 767 FX_STRSIZE Find(FX_LPCWSTR lpszSub, FX_STRSIZE star
t = 0) const; |
| 768 | 768 |
| 769 FX_STRSIZE Find(FX_WCHAR ch, FX_STRSIZE start = 0)
const; | 769 FX_STRSIZE Find(FX_WCHAR ch, FX_STRSIZE start = 0)
const; |
| 770 | 770 |
| 771 FX_STRSIZE Replace(FX_LPCWSTR lpszOld, FX_LPCWSTR l
pszNew); | 771 FX_STRSIZE Replace(FX_LPCWSTR lpszOld, FX_LPCWSTR l
pszNew); |
| 772 | 772 |
| 773 FX_STRSIZE Remove(FX_WCHAR ch); | 773 FX_STRSIZE Remove(FX_WCHAR ch); |
| 774 | 774 |
| 775 CFX_ByteString UTF8Encode() const; | 775 CFX_ByteString UTF8Encode() const; |
| 776 | 776 |
| 777 CFX_ByteString» » » UTF16LE_Encode(FX_BOOL bTerminate = TRUE
) const; | 777 CFX_ByteString» » » UTF16LE_Encode() const; |
| 778 | 778 |
| 779 void ConvertFrom(const CFX_ByteString
& str, CFX_CharMap* pCharMap = NULL); | 779 void ConvertFrom(const CFX_ByteString
& str, CFX_CharMap* pCharMap = NULL); |
| 780 protected: | 780 protected: |
| 781 void InitStr(FX_LPCWSTR ptr, int len)
; | 781 void InitStr(FX_LPCWSTR ptr, int len)
; |
| 782 | 782 |
| 783 CFX_StringDataW* m_pData; | 783 CFX_StringDataW* m_pData; |
| 784 void CopyBeforeWrite(); | 784 void CopyBeforeWrite(); |
| 785 void AllocBeforeWrite(FX_STRSIZE nLen
); | 785 void AllocBeforeWrite(FX_STRSIZE nLen
); |
| 786 void ConcatInPlace(FX_STRSIZE nSrcLen
, FX_LPCWSTR lpszSrcData); | 786 void ConcatInPlace(FX_STRSIZE nSrcLen
, FX_LPCWSTR lpszSrcData); |
| 787 void ConcatCopy(FX_STRSIZE nSrc1Len,
FX_LPCWSTR lpszSrc1Data, FX_STRSIZE nSrc2Len, FX_LPCWSTR lpszSrc2Data); | 787 void ConcatCopy(FX_STRSIZE nSrc1Len,
FX_LPCWSTR lpszSrc1Data, FX_STRSIZE nSrc2Len, FX_LPCWSTR lpszSrc2Data); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); | 865 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); |
| 866 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) | 866 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) |
| 867 { | 867 { |
| 868 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); | 868 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); |
| 869 } | 869 } |
| 870 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) | 870 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) |
| 871 { | 871 { |
| 872 return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); | 872 return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); |
| 873 } | 873 } |
| 874 #endif | 874 #endif |
| OLD | NEW |