tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

string_number_conversions_win.h (1380B)


      1 // Copyright 2020 The Chromium Authors
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef BASE_STRINGS_STRING_NUMBER_CONVERSIONS_WIN_H_
      6 #define BASE_STRINGS_STRING_NUMBER_CONVERSIONS_WIN_H_
      7 
      8 #include <string>
      9 
     10 #include "base/base_export.h"
     11 #include "base/strings/string_piece.h"
     12 
     13 namespace base {
     14 
     15 BASE_EXPORT std::wstring NumberToWString(int value);
     16 BASE_EXPORT std::wstring NumberToWString(unsigned int value);
     17 BASE_EXPORT std::wstring NumberToWString(long value);
     18 BASE_EXPORT std::wstring NumberToWString(unsigned long value);
     19 BASE_EXPORT std::wstring NumberToWString(long long value);
     20 BASE_EXPORT std::wstring NumberToWString(unsigned long long value);
     21 BASE_EXPORT std::wstring NumberToWString(double value);
     22 
     23 // The following section contains overloads of the cross-platform APIs for
     24 // std::wstring and base::WStringPiece.
     25 BASE_EXPORT bool StringToInt(WStringPiece input, int* output);
     26 BASE_EXPORT bool StringToUint(WStringPiece input, unsigned* output);
     27 BASE_EXPORT bool StringToInt64(WStringPiece input, int64_t* output);
     28 BASE_EXPORT bool StringToUint64(WStringPiece input, uint64_t* output);
     29 BASE_EXPORT bool StringToSizeT(WStringPiece input, size_t* output);
     30 BASE_EXPORT bool StringToDouble(WStringPiece input, double* output);
     31 
     32 }  // namespace base
     33 
     34 #endif  // BASE_STRINGS_STRING_NUMBER_CONVERSIONS_WIN_H_