aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/parsing.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-02-20 17:09:46 +0000
committerlloyd <[email protected]>2012-02-20 17:09:46 +0000
commit8c2dc1a6c3bf352a56622d569dc855ca8d6ab5e0 (patch)
tree6f50627e2e73c2b1fc1295dde8b19c4f169de46d /src/utils/parsing.h
parent24c1546324995da70c51137ad138c3bb997a37b9 (diff)
parente943fc67962b6e4dc2c7c64707dc2cf062728520 (diff)
propagate from branch 'net.randombit.botan.tls-state-machine' (head 0ceb9cde62a2b3614901ae85a53546d9fc641326)
to branch 'net.randombit.botan.cxx11' (head 777e65950ef3706a82e5df20dcca7fcc999ca533)
Diffstat (limited to 'src/utils/parsing.h')
-rw-r--r--src/utils/parsing.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/utils/parsing.h b/src/utils/parsing.h
index 668272309..12a31a7dd 100644
--- a/src/utils/parsing.h
+++ b/src/utils/parsing.h
@@ -42,6 +42,15 @@ BOTAN_DLL std::string replace_char(const std::string& str,
char to_char);
/**
+* Join a string
+* @param strs strings to join
+* @param delim the delimitor
+* @return string joined by delim
+*/
+BOTAN_DLL std::string string_join(const std::vector<std::string>& strs,
+ char delim);
+
+/**
* Parse an ASN.1 OID
* @param oid the OID in string form
* @return OID components
@@ -58,19 +67,12 @@ BOTAN_DLL bool x500_name_cmp(const std::string& name1,
const std::string& name2);
/**
-* Convert a number to a string
-* @param n the integer to convert to a string
-* @param min_len the min length of the output string
-* @return n convert to a string
-*/
-BOTAN_DLL std::string to_string(u64bit n, size_t min_len = 0);
-
-/**
* Convert a string to a number
* @param str the string to convert
* @return number value of the string
*/
-BOTAN_DLL u32bit to_u32bit(const std::string& str);
+inline u32bit to_u32bit(const std::string& str)
+ { return std::stoul(str); }
/**
* Convert a time specification to a number