summaryrefslogtreecommitdiff
path: root/src/common/string_util.h
diff options
context:
space:
mode:
authorGravatar Lioncash2018-11-13 14:09:05 -0500
committerGravatar Lioncash2018-11-13 18:13:45 -0500
commitf1219e3a874bb16f2928e8b9e879f2a4ddf22ab7 (patch)
treef74eecf8914cc377b8b7af64f6d50d33edafba1f /src/common/string_util.h
parentstring_util: Remove ThousandSeparate() (diff)
downloadyuzu-f1219e3a874bb16f2928e8b9e879f2a4ddf22ab7.tar.gz
yuzu-f1219e3a874bb16f2928e8b9e879f2a4ddf22ab7.tar.xz
yuzu-f1219e3a874bb16f2928e8b9e879f2a4ddf22ab7.zip
string_util: Remove TryParse()
This is an unused hold-over from Dolphin that was primarily used to parse values out of the .ini files. Given we already have libraries that do this for us, we don't need to keep this around.
Diffstat (limited to 'src/common/string_util.h')
-rw-r--r--src/common/string_util.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h
index f76fc43dc..7e32d6405 100644
--- a/src/common/string_util.h
+++ b/src/common/string_util.h
@@ -5,8 +5,6 @@
5#pragma once 5#pragma once
6 6
7#include <cstddef> 7#include <cstddef>
8#include <iomanip>
9#include <sstream>
10#include <string> 8#include <string>
11#include <vector> 9#include <vector>
12#include "common/common_types.h" 10#include "common/common_types.h"
@@ -28,21 +26,6 @@ std::string StripQuotes(const std::string& s);
28 26
29std::string StringFromBool(bool value); 27std::string StringFromBool(bool value);
30 28
31bool TryParse(const std::string& str, bool* output);
32bool TryParse(const std::string& str, u32* output);
33
34template <typename N>
35static bool TryParse(const std::string& str, N* const output) {
36 std::istringstream iss(str);
37
38 N tmp = 0;
39 if (iss >> tmp) {
40 *output = tmp;
41 return true;
42 } else
43 return false;
44}
45
46std::string TabsToSpaces(int tab_size, std::string in); 29std::string TabsToSpaces(int tab_size, std::string in);
47 30
48void SplitString(const std::string& str, char delim, std::vector<std::string>& output); 31void SplitString(const std::string& str, char delim, std::vector<std::string>& output);