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