| 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 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 313 |
| 314 void Format(FX_LPCSTR lpszFormat, ...
); | 314 void Format(FX_LPCSTR lpszFormat, ...
); |
| 315 | 315 |
| 316 void FormatV(FX_LPCSTR lpszFormat, va
_list argList); | 316 void FormatV(FX_LPCSTR lpszFormat, va
_list argList); |
| 317 | 317 |
| 318 | 318 |
| 319 void Reserve(FX_STRSIZE len); | 319 void Reserve(FX_STRSIZE len); |
| 320 | 320 |
| 321 FX_LPSTR GetBuffer(FX_STRSIZE len); | 321 FX_LPSTR GetBuffer(FX_STRSIZE len); |
| 322 | 322 |
| 323 FX_LPSTR LockBuffer(); |
| 324 |
| 323 void ReleaseBuffer(FX_STRSIZE len = -
1); | 325 void ReleaseBuffer(FX_STRSIZE len = -
1); |
| 324 | 326 |
| 325 CFX_ByteString Mid(FX_STRSIZE first) const; | 327 CFX_ByteString Mid(FX_STRSIZE first) const; |
| 326 | 328 |
| 327 CFX_ByteString Mid(FX_STRSIZE first, FX_STRSIZE count)
const; | 329 CFX_ByteString Mid(FX_STRSIZE first, FX_STRSIZE count)
const; |
| 328 | 330 |
| 329 CFX_ByteString Left(FX_STRSIZE count) const; | 331 CFX_ByteString Left(FX_STRSIZE count) const; |
| 330 | 332 |
| 331 CFX_ByteString Right(FX_STRSIZE count) const; | 333 CFX_ByteString Right(FX_STRSIZE count) const; |
| 332 | 334 |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 void TrimLeft(); | 723 void TrimLeft(); |
| 722 | 724 |
| 723 void TrimLeft(FX_WCHAR chTarget); | 725 void TrimLeft(FX_WCHAR chTarget); |
| 724 | 726 |
| 725 void TrimLeft(FX_LPCWSTR lpszTargets)
; | 727 void TrimLeft(FX_LPCWSTR lpszTargets)
; |
| 726 | 728 |
| 727 void Reserve(FX_STRSIZE len); | 729 void Reserve(FX_STRSIZE len); |
| 728 | 730 |
| 729 FX_LPWSTR GetBuffer(FX_STRSIZE len); | 731 FX_LPWSTR GetBuffer(FX_STRSIZE len); |
| 730 | 732 |
| 733 FX_LPWSTR LockBuffer(); |
| 734 |
| 731 void ReleaseBuffer(FX_STRSIZE len = -
1); | 735 void ReleaseBuffer(FX_STRSIZE len = -
1); |
| 732 | 736 |
| 733 int GetInteger() const; | 737 int GetInteger() const; |
| 734 | 738 |
| 735 FX_FLOAT GetFloat() const; | 739 FX_FLOAT GetFloat() const; |
| 736 | 740 |
| 737 FX_STRSIZE Find(FX_LPCWSTR lpszSub, FX_STRSIZE star
t = 0) const; | 741 FX_STRSIZE Find(FX_LPCWSTR lpszSub, FX_STRSIZE star
t = 0) const; |
| 738 | 742 |
| 739 FX_STRSIZE Find(FX_WCHAR ch, FX_STRSIZE start = 0)
const; | 743 FX_STRSIZE Find(FX_WCHAR ch, FX_STRSIZE start = 0)
const; |
| 740 | 744 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); | 839 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); |
| 836 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) | 840 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) |
| 837 { | 841 { |
| 838 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); | 842 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); |
| 839 } | 843 } |
| 840 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) | 844 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) |
| 841 { | 845 { |
| 842 return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); | 846 return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); |
| 843 } | 847 } |
| 844 #endif | 848 #endif |
| OLD | NEW |