Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1915)

Side by Side Diff: core/fxcrt/include/fx_string.h

Issue 1904563002: Standalone GN build. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CORE_FXCRT_INCLUDE_FX_STRING_H_ 7 #ifndef CORE_FXCRT_INCLUDE_FX_STRING_H_
8 #define CORE_FXCRT_INCLUDE_FX_STRING_H_ 8 #define CORE_FXCRT_INCLUDE_FX_STRING_H_
9 9
10 #include <stdint.h> // For intptr_t. 10 #include <stdint.h> // For intptr_t.
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 static CFX_WideString FromCodePage(const CFX_ByteStringC& str, 499 static CFX_WideString FromCodePage(const CFX_ByteStringC& str,
500 uint16_t codepage); 500 uint16_t codepage);
501 501
502 static CFX_WideString FromUTF8(const CFX_ByteStringC& str); 502 static CFX_WideString FromUTF8(const CFX_ByteStringC& str);
503 static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len); 503 static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len);
504 504
505 static FX_STRSIZE WStringLength(const unsigned short* str); 505 static FX_STRSIZE WStringLength(const unsigned short* str);
506 506
507 // Explicit conversion to C-style wide string. 507 // Explicit conversion to C-style wide string.
508 // Note: Any subsequent modification of |this| will invalidate the result. 508 // Note: Any subsequent modification of |this| will invalidate the result.
509 const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } 509 const FX_WCHAR* c_str() const;
510 510
511 // Explicit conversion to CFX_WideStringC. 511 // Explicit conversion to CFX_WideStringC.
512 // Note: Any subsequent modification of |this| will invalidate the result. 512 // Note: Any subsequent modification of |this| will invalidate the result.
513 CFX_WideStringC AsStringC() const { 513 CFX_WideStringC AsStringC() const {
514 return CFX_WideStringC(c_str(), GetLength()); 514 return CFX_WideStringC(c_str(), GetLength());
515 } 515 }
516 516
517 void clear() { m_pData.Reset(); } 517 void clear() { m_pData.Reset(); }
518 518
519 FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; } 519 FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 } 683 }
684 684
685 FX_FLOAT FX_atof(const CFX_ByteStringC& str); 685 FX_FLOAT FX_atof(const CFX_ByteStringC& str);
686 inline FX_FLOAT FX_atof(const CFX_WideStringC& wsStr) { 686 inline FX_FLOAT FX_atof(const CFX_WideStringC& wsStr) {
687 return FX_atof(FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()).c_str()); 687 return FX_atof(FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()).c_str());
688 } 688 }
689 void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData); 689 void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData);
690 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); 690 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf);
691 691
692 #endif // CORE_FXCRT_INCLUDE_FX_STRING_H_ 692 #endif // CORE_FXCRT_INCLUDE_FX_STRING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698