Fix the system clock at 1THz making 1 simulation tick = 1 ps
[gem5.git] / base / str.hh
index 6c3453b8bc0387edbb344fd7de8fd72d7cfbbc8e..79e33a1be6fc6f5273bc4455087158b39a5f5d2b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2001-2005 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -90,6 +90,20 @@ to_lower(const std::string &s)
     return lower;
 }
 
+// Split the string s into lhs and rhs on the first occurence of the
+// character c.
+bool
+split_first(const std::string &s, std::string &lhs, std::string &rhs, char c);
+
+// Split the string s into lhs and rhs on the last occurence of the
+// character c.
+bool
+split_last(const std::string &s, std::string &lhs, std::string &rhs, char c);
+
+// Tokenize the string <s> splitting on the character <token>, and
+// place the result in the string vector <vector>.  If <ign> is true,
+// then empty result strings (due to trailing tokens, or consecutive
+// tokens) are skipped.
 void
 tokenize(std::vector<std::string> &vector, const std::string &s,
          char token, bool ign = true);
@@ -99,7 +113,7 @@ to_number(const std::string &value, T &retval);
 
 template <class T>
 inline std::string
-to_string(const Tvalue)
+to_string(const T &value)
 {
     std::stringstream str;
     str << value;