1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FXCRT_FX_STRING_H_ 8 #define CORE_FXCRT_FX_STRING_H_ 9 10 #include "core/fxcrt/bytestring.h" 11 #include "core/fxcrt/widestring.h" 12 13 #define FXBSTR_ID(c1, c2, c3, c4) \ 14 (((uint32_t)c1 << 24) | ((uint32_t)c2 << 16) | ((uint32_t)c3 << 8) | \ 15 ((uint32_t)c4)) 16 17 ByteString FX_UTF8Encode(const WideStringView& wsStr); 18 float FX_atof(const ByteStringView& str); 19 float FX_atof(const WideStringView& wsStr); 20 bool FX_atonum(const ByteStringView& str, void* pData); 21 size_t FX_ftoa(float f, char* buf); 22 23 #endif // CORE_FXCRT_FX_STRING_H_ 24